:root {
  --bg: #f1f5f8;
  --ink: #172c31;
  --muted: #465a64;
  --line: #bacbd2;
  --green: #096452;
  --light: #e8f4ef;
  --warn: #754300;
  --focus: #0752a4;
}
body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
}
[hidden] {
  display: none !important;
}
a {
  color: #075a49;
  text-decoration-thickness: 1.5px;
}
a:hover {
  text-decoration: underline;
}
button,
.button {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  min-height: 42px;
  padding: 10px 15px;
  border-color: #9eb3bd;
  border-radius: 8px;
  transition:
    background 0.12s,
    border-color 0.12s;
}
.primary {
  background: #096452;
  border-color: #096452;
  color: #fff;
}
.primary:hover {
  background: #064b3e;
}
.header {
  padding-top: 18px;
  padding-bottom: 18px;
  align-items: center;
}
.header nav {
  align-items: center;
  gap: 6px;
}
.header nav button {
  font-size: 13px;
}
.brand {
  font-size: 22px;
}
.header #connection-status {
  font-size: 12px;
  font-weight: 600;
}
.auth-account {
  color: #344b57;
  font-size: 13px;
  max-width: 250px;
}
main {
  max-width: 1380px;
  padding: 28px 32px;
}
h1 {
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -0.5px;
}
h2 {
  font-size: 22px;
  line-height: 1.35;
}
h3 {
  font-size: 18px;
  line-height: 1.4;
}
.small,
.state-label {
  font-size: 13px;
  line-height: 1.55;
}
.muted {
  color: var(--muted);
}
label {
  font-size: 14px;
  font-weight: 600;
  color: #223c46;
  gap: 8px;
}
label .muted {
  font-weight: 400;
}
input,
select,
textarea {
  font: inherit;
  font-size: 15px;
  color: #162d36;
  min-height: 46px;
  border: 1px solid #91a8b3;
  border-radius: 7px;
  padding: 11px 13px;
  line-height: 1.4;
  background: #fff;
}
input::placeholder,
textarea::placeholder {
  color: #536875;
  opacity: 1;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--focus);
  outline: 3px solid #a9cdec;
  outline-offset: 2px;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
button:disabled {
  opacity: 1;
  background: #e8edf0;
  color: #4b5f68;
  border-color: #b7c8cf;
  cursor: not-allowed;
}
.primary:disabled {
  background: #d9e9e4;
  color: #335d50;
}
.search-box {
  padding: 28px;
  border-radius: 14px;
  box-shadow: 0 3px 16px #16394a05;
}
.search-box > .muted {
  font-size: 15px;
  margin: 10px 0 25px;
  max-width: 880px;
}
.search-fields {
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  gap: 20px;
  align-items: end;
}
.search-fields .primary {
  height: 46px;
  min-width: 180px;
  font-size: 15px;
}
.grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}
.search-scope {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 20px 0 12px;
}
.search-scope > label > span {
  display: block;
  min-height: 23px;
}
.search-scope .muted {
  display: inline !important;
}
.advanced {
  font-size: 14px;
  padding-top: 4px;
}
.advanced summary {
  font-weight: 600;
}
.advanced-grid {
  gap: 20px;
  margin-top: 5px;
}
.advanced > p,
.optional-research .muted {
  font-size: 13px;
  line-height: 1.6;
}
.optional-research {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.6;
  margin-top: 18px;
  font-size: 14px;
  font-weight: 500;
}
.optional-research input {
  margin-top: 3px;
  flex-shrink: 0;
}
.optional-research span .muted {
  display: block;
  font-weight: 400;
}
.check input,
.checklist input {
  appearance: auto;
  accent-color: #086451;
  width: 19px;
  height: 19px;
  min-height: 19px;
  flex: 0 0 19px;
  padding: 0;
}
.checklist label {
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 7px;
  cursor: pointer;
  align-items: start;
}
.checklist label:hover {
  background: #edf4f7;
}
.checklist label.selected {
  background: #e5f3ed;
}
.checklist input {
  margin: 4px 0 0;
}
.checklist {
  padding: 7px;
  max-height: 280px;
  border-color: #b5c7d0;
}
.municipality-picker {
  padding: 20px;
  background: #f6f9fb;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.municipality-picker .actions {
  align-items: center;
}
.selection-count {
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
  color: #07533f;
  background: #e3f2ea;
  border: 1px solid #afd0bd;
  border-radius: 20px;
  padding: 5px 11px;
  white-space: nowrap;
}
.field-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.field-heading label {
  margin: 0;
}
.field-heading strong {
  font-size: 15px;
}
.cnae-picker {
  padding-top: 14px;
  margin-top: 20px;
  border-top: 1px solid #c7d5dc;
}
.cnae-select {
  position: relative;
}
.cnae-input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid #91a8b3;
  border-radius: 9px;
  background: #fff;
  min-height: 50px;
}
.cnae-input-wrap:focus-within {
  outline: 3px solid #a9cdec;
  outline-offset: 2px;
  border-color: var(--focus);
}
.cnae-input-wrap input {
  border: 0;
  outline: 0 !important;
  border-radius: 9px;
  flex: 1;
  min-width: 0;
  box-shadow: none;
}
.search-icon {
  font-size: 25px;
  color: #344f5f;
  margin-left: 14px;
}
.cnae-input-wrap button {
  border: 0;
  background: transparent;
  font-size: 22px;
  min-width: 44px;
  border-left: 1px solid #d2dde3;
  border-radius: 0 8px 8px 0;
}
.cnae-popup {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #92adb9;
  box-shadow: 0 12px 36px #18394926;
  border-radius: 12px;
  padding: 16px;
}
.cnae-popup .field-heading button {
  font-size: 13px;
  min-height: 34px;
  padding: 6px 10px;
}
.cnae-popup .checklist {
  max-height: 290px;
  margin: 10px 0;
}
.cnae-popup .checklist label > span {
  display: grid;
  gap: 2px;
}
.cnae-popup .checklist label strong {
  font-size: 13px;
  color: #173a46;
}
.cnae-popup .checklist label span span {
  font-size: 14px;
  font-weight: 400;
  color: #243c47;
}
.cnae-batch {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.cnae-batch button {
  font-size: 13px;
}
.cnae-picker #cnae-help {
  margin: 10px 0;
}
.selected-cnaes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cnae-chip {
  display: flex;
  align-items: center;
  max-width: 100%;
  background: #eaf4f0;
  border: 1px solid #9bc4b3;
  border-radius: 8px;
  color: #153f30;
  font-size: 13px;
  font-weight: 500;
}
.cnae-chip span {
  padding: 6px 0 6px 11px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.cnae-chip button {
  border: 0;
  background: transparent;
  color: #17442f;
  font-size: 21px;
  min-height: 36px;
  min-width: 36px;
  padding: 4px 9px;
  flex-shrink: 0;
}
.cnae-picker .actions {
  gap: 9px;
}
.cnae-paste {
  font-size: 13px;
}
.cnae-paste label {
  margin: 12px 0 6px;
}
.cnae-paste textarea {
  font-family: ui-monospace, monospace;
}
.cnae-picker #cnae-selection-message:empty {
  display: none;
}
.cnae-picker #cnae-selection-message {
  color: #114b39;
  font-weight: 600;
}
.client-cnaes {
  padding: 24px;
  border-radius: 12px;
}
.client-cnaes h2 {
  font-size: 22px;
}
.client-cnaes-top {
  gap: 12px;
}
.client-cnaes-top button {
  font-size: 14px;
  padding: 14px;
  text-align: left;
  line-height: 1.5;
  border-color: #abc0cb;
}
.client-cnaes-top button span {
  font-size: 13px;
  color: #334e5c;
  margin-top: 5px;
}
.client-cnaes-filter {
  max-width: 520px;
}
.table-wrap {
  border-color: #b8cbd3;
  border-radius: 10px;
}
th {
  font-size: 13px;
  color: #243e4b;
  background: #eaf0f4;
  font-weight: 700;
  padding: 14px 16px;
}
td {
  font-size: 14px;
  padding: 16px;
  line-height: 1.6;
  border-color: #d4dfe5;
}
.company-name {
  font-size: 16px;
  font-weight: 650;
  color: #102c37;
}
.company-meta {
  font-size: 13px;
  line-height: 1.7;
  color: #354f5d;
}
.state-label {
  color: #354f5d;
}
.status {
  font-size: 12px;
  font-weight: 700;
}
.contact-line {
  font-size: 14px;
}
.table-tools {
  gap: 12px;
  align-items: center;
}
.table-tools input,
.table-tools select {
  font-size: 14px;
  min-height: 44px;
}
.filter-options {
  gap: 18px;
  align-items: end;
}
.progress {
  background: #e8f3ef;
  border: 1px solid #afcdbf;
  border-radius: 10px;
  padding: 18px 20px;
  margin: 20px 0;
  gap: 18px;
}
.progress strong {
  font-size: 15px;
  color: #174936;
}
.progress #job-message {
  font-size: 14px;
  line-height: 1.5;
  color: #284d3f;
  margin-top: 5px;
  display: block;
}
.progress > div:first-child {
  flex: 1;
}
.job-activity {
  height: 5px;
  border-radius: 5px;
  background: #c5ddd1;
  max-width: 440px;
  overflow: hidden;
  margin-top: 12px;
}
.job-activity span {
  display: block;
  width: 36%;
  height: 100%;
  background: #08735a;
  animation: activity-sweep 1.5s ease-in-out infinite;
}
.job-running::before,
.is-loading::before {
  content: '';
  display: inline-block;
  vertical-align: -2px;
  flex: 0 0 15px;
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
}
.is-loading {
  cursor: progress !important;
}
.spinner {
  width: 18px;
  height: 18px;
  border-width: 2px;
  border-color: currentColor;
  border-right-color: transparent;
  vertical-align: -3px;
  margin-right: 9px;
}
.activity-status {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  display: flex;
  align-items: center;
  max-width: min(520px, calc(100vw - 32px));
  gap: 5px;
  background: #173c47;
  color: #fff;
  padding: 13px 18px;
  border-radius: 10px;
  box-shadow: 0 8px 28px #17374730;
  font-size: 14px;
  font-weight: 500;
}
.activity-status .spinner {
  flex-shrink: 0;
}
.alert {
  font-size: 14px;
  color: #74400a;
  background: #fff1dc;
  border-color: #d5b581;
  border-left: 4px solid #a86211;
}
dialog {
  padding: 26px;
  border: 1px solid #a5bdc8;
  border-radius: 14px;
  box-shadow: 0 16px 80px #102d3840;
  max-height: 90dvh;
}
dialog::backdrop {
  background: #0e223866;
}
.dialog-header {
  gap: 20px;
  align-items: start;
  margin-bottom: 20px;
}
.dialog-header h2 {
  font-size: 23px;
}
.dialog-header button {
  min-width: 42px;
  font-size: 22px;
}
.company-dialog {
  width: min(1120px, 96vw);
}
.detail-tabs {
  gap: 6px;
  border-bottom: 1px solid #c2d1d9;
  margin: 15px 0 22px;
  flex-wrap: wrap;
}
.detail-tabs button {
  font-size: 14px;
  padding: 12px 15px;
  color: #334d5a;
}
.detail-tabs button[aria-selected='true'] {
  color: #064d3b;
  background: #e4f2eb;
  border-color: #95bfae;
}
.detail-section {
  padding: 22px;
  border: 1px solid #c4d3da;
  border-radius: 10px;
  margin: 18px 0;
  background: #fff;
}
.detail-section h3 {
  font-size: 18px;
}
.finding {
  font-size: 14px;
  padding: 17px;
  background: #f4f8fa;
  border-color: #c2d4df;
  border-radius: 9px;
  margin-top: 12px;
}
.finding strong {
  font-size: 16px;
}
.finding .evidence {
  font-size: 13px;
  color: #344d5b;
  border-left: 3px solid #8ca9ba;
  padding-left: 13px;
  line-height: 1.7;
}
.manual-links {
  gap: 9px;
  display: flex;
  flex-wrap: wrap;
}
.manual-links a {
  font-size: 13px;
  padding: 9px 12px;
  border: 1px solid #b7cbd6;
  border-radius: 7px;
  background: #f6f9fb;
}
.manual-links p {
  flex-basis: 100%;
  margin-top: 5px;
}
.department-badge {
  display: inline-block;
  font-size: 12px;
  color: #174c39;
  background: #e1f1e9;
  border: 1px solid #a1c8b4;
  border-radius: 20px;
  padding: 3px 9px;
  margin: 5px 0;
}
.key-value {
  grid-template-columns: minmax(140px, 210px) minmax(0, 1fr);
  font-size: 14px;
}
.detail-section p {
  overflow-wrap: anywhere;
}
#panel-prospecting .grid {
  gap: 16px 20px;
}
#panel-prospecting label {
  margin: 0;
}
#panel-prospecting .actions {
  margin-top: 20px;
}
#panel-prospecting .grid label:last-child {
  grid-column: 1/-1;
}
#settings-form,
#crm-settings-form {
  display: grid;
  gap: 18px;
}
#settings-form > p,
#crm-settings-form > p {
  margin: 0;
}
#settings-form label,
#crm-settings-form label {
  margin: 0;
}
#crm-integration-fields,
#crm-pdv-fields {
  display: grid;
  gap: 18px;
}
#crm-service-settings > summary {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}
.auth-page {
  font-size: 15px;
  background: #eef3f7;
}
.auth-page .auth-card {
  max-width: 500px;
  padding: 36px;
}
.auth-card h1 {
  font-size: 29px;
}
.auth-environment,
.auth-note,
.auth-card summary {
  font-size: 13px;
  color: #3e5563;
}
.auth-card #login-message {
  font-size: 14px;
  color: #982222;
}
.auth-card input {
  font-size: 16px;
}
.auth-card button {
  font-size: 15px;
  min-height: 46px;
}
.auth-card form {
  gap: 18px;
}
.pagination {
  font-size: 14px;
}
.coverage {
  font-size: 14px;
}
footer {
  font-size: 13px;
  color: #425b67;
}
.welcome {
  color: #34515f;
}
.welcome p {
  font-size: 16px;
}
.welcome .small {
  font-size: 14px;
}
@keyframes activity-sweep {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(350%);
  }
}
.buyer-task-progress {
  margin: 15px 0;
  padding: 14px;
  background: #edf5f8;
  border: 1px solid #b7cdd8;
  border-radius: 9px;
}
.buyer-progress-track {
  height: 7px;
  background: #cbdde5;
  border-radius: 6px;
  overflow: hidden;
}
.buyer-progress-track > span {
  height: 100%;
  width: 0;
  display: block;
  background: #086451;
  transition: width 0.2s;
}
.buyer-task-progress p {
  margin: 8px 0 0;
}
.research-warnings {
  font-size: 13px;
  padding: 16px;
  border-left: 4px solid #9a611b;
  background: #fff3df;
  margin-top: 16px;
  border-radius: 6px;
}
.unverified-person {
  background: #f6f8fa;
  border-style: dashed;
}
.buyer-sources {
  margin-top: 20px;
  font-size: 14px;
}
#buyer-candidates h4 {
  font-size: 16px;
  margin: 24px 0 10px;
}
#ai-status-message {
  padding: 12px;
  border-left: 4px solid #a46417;
  background: #fff2dc;
  color: #61400f;
  border-radius: 5px;
}
.selected-cnaes {
  max-height: 160px;
  overflow: auto;
  margin: 10px 0 12px;
}
.selected-cnaes:empty {
  display: none;
}
.cnae-batch .muted {
  flex-basis: 100%;
}
@media (max-width: 640px) {
  .cnae-popup {
    position: static;
    margin-top: 8px;
    max-height: 60dvh;
    overflow: auto;
  }
  .selected-cnaes {
    max-height: 180px;
  }
}
.search-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.search-actions > button {
  min-height: 46px;
  white-space: nowrap;
}
@media (max-width: 1000px) {
  .search-actions {
    grid-column: 1/-1;
  }
  .search-actions > button {
    flex: 1;
  }
}
@media (max-width: 640px) {
  .search-actions {
    display: grid;
    grid-template-columns: 1fr;
    grid-column: auto;
  }
}
@media (max-width: 1000px) {
  .header {
    padding: 16px 24px;
    align-items: flex-start;
  }
  .header nav {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .auth-account {
    flex-basis: 100%;
    max-width: none;
    text-align: right;
  }
  .table-tools {
    flex-wrap: wrap;
  }
  .table-tools input {
    flex-basis: 100%;
  }
  .search-fields {
    grid-template-columns: 1fr 1fr;
  }
  .search-fields .primary {
    grid-column: 1/-1;
  }
  .advanced-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  main {
    padding: 20px 14px;
  }
  .header {
    padding: 14px;
    flex-wrap: wrap;
  }
  .header nav {
    width: 100%;
    justify-content: flex-start;
    gap: 3px;
  }
  .header nav button {
    font-size: 12px;
    padding: 8px 9px;
    min-height: 38px;
  }
  .auth-account {
    order: 5;
    text-align: left;
    font-size: 12px;
    max-width: 100%;
    margin-top: 5px;
  }
  .brand {
    font-size: 22px;
  }
  .search-box {
    padding: 20px 16px;
  }
  .search-fields,
  .search-scope,
  .advanced-grid,
  .grid,
  #panel-prospecting .grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .search-fields .primary {
    grid-column: auto;
    width: 100%;
  }
  h1 {
    font-size: 25px;
  }
  .field-heading {
    align-items: center;
  }
  .field-heading strong {
    font-size: 14px;
  }
  .selection-count {
    font-size: 12px;
    padding: 4px 8px;
  }
  .cnae-popup {
    padding: 12px;
    max-width: 100%;
  }
  .cnae-popup .checklist {
    max-height: 250px;
  }
  .cnae-batch .muted {
    display: none;
  }
  .cnae-chip {
    width: 100%;
    justify-content: space-between;
    font-size: 13px;
  }
  .cnae-picker > .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .cnae-picker > .actions > button:first-child,
  .cnae-picker > .actions > a {
    grid-column: 1/-1;
  }
  .client-cnaes {
    padding: 20px 16px;
  }
  .client-cnaes h2 {
    font-size: 20px;
  }
  .client-cnaes-top {
    grid-template-columns: 1fr;
  }
  .result-header {
    align-items: start;
    gap: 14px;
  }
  .progress {
    padding: 15px;
    flex-wrap: wrap;
  }
  .progress .actions {
    justify-content: flex-start;
  }
  .detail-section {
    padding: 16px;
    margin: 14px 0;
  }
  dialog {
    padding: 18px;
  }
  .detail-tabs button {
    font-size: 13px;
    padding: 9px 10px;
  }
  .key-value {
    grid-template-columns: minmax(100px, 130px) minmax(0, 1fr);
  }
  .auth-page {
    padding: 16px;
  }
  .auth-page .auth-card {
    padding: 26px 22px;
  }
  .activity-status {
    bottom: 14px;
    right: 14px;
    font-size: 13px;
    padding: 11px 14px;
  }
  .table-tools > select {
    width: 100%;
  }
  .optional-research {
    font-size: 14px;
  }
  .municipality-picker {
    padding: 14px;
  }
  footer {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
  .job-activity span {
    width: 100%;
  }
}

.search-fields {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.search-box > .muted {
  margin-bottom: 10px;
}
.search-box #search-collection-info {
  margin-bottom: 20px;
  font-size: 13px;
}
.search-box .search-actions {
  margin-top: 20px;
  justify-content: flex-end;
}
.search-box .search-actions > .primary {
  min-width: 190px;
}
.search-box #search-options {
  padding-top: 14px;
  border-top: 1px solid #c6d4dc;
  margin-top: 18px;
}
.search-box #search-options > summary {
  color: #174c3c;
  width: fit-content;
}
.search-box #search-options .advanced-grid {
  margin-top: 14px;
}
.client-cnaes {
  padding: 15px 20px;
  margin: 16px 0;
}
.client-cnaes > summary {
  font-size: 15px;
  font-weight: 650;
  color: #214d42;
}
.client-cnaes[open] > summary {
  margin-bottom: 18px;
}
.table-tools input {
  min-width: 180px;
}
@media (max-width: 1000px) {
  .search-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .search-box .search-actions {
    display: flex;
  }
  .search-box .search-actions > button {
    flex: initial;
  }
}
@media (max-width: 640px) {
  .search-fields {
    grid-template-columns: minmax(0, 1fr);
  }
  .search-box .search-actions {
    display: flex;
    flex-wrap: wrap;
  }
  .search-box .search-actions > .primary {
    flex: 1;
  }
  .client-cnaes {
    padding: 14px 16px;
  }
  .client-cnaes > summary {
    font-size: 14px;
  }
}

.result-filters {
  background: #fff;
  border: 1px solid #b9cbd4;
  border-radius: 10px;
  padding: 13px 17px;
  margin-bottom: 14px;
}
.result-filters > summary {
  font-size: 14px;
  font-weight: 650;
  color: #1d4f42;
  cursor: pointer;
}
.filter-active-count {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  margin-left: 8px;
  color: #24523f;
  background: #e7f3ed;
  border: 1px solid #b1cfbd;
  border-radius: 15px;
  padding: 2px 9px;
}
.result-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0 12px;
}
.result-filter-grid label {
  min-width: 0;
}
.result-filter-grid select {
  width: 100%;
  min-width: 0;
  font-size: 14px;
}
.result-filters > p {
  margin-bottom: 0;
}
.new-company-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 650;
  color: #15533e;
  background: #e1f2e9;
  border: 1px solid #a4cbb7;
  border-radius: 12px;
  padding: 2px 8px;
  margin: 5px 0 1px;
}
.filter-options > label {
  width: 230px;
}
.table-tools #clear-result-filters {
  white-space: nowrap;
}
@media (max-width: 850px) {
  .result-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 540px) {
  .result-filter-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .result-filters {
    padding: 13px;
  }
  .table-tools #clear-result-filters,
  .table-tools #batch-research {
    flex: 1;
  }
  .filter-options > label {
    width: 100%;
  }
}
.filter-options select {
  min-height: 42px;
  font-size: 14px;
}
.filter-options #summary {
  font-size: 13px;
  line-height: 1.5;
  text-align: right;
  max-width: 70%;
}
@media (max-width: 640px) {
  .filter-options #summary {
    max-width: 100%;
    text-align: left;
  }
}
.ai-cost-controls {
  border: 1px solid #b8cbd4;
  border-radius: 8px;
  padding: 16px;
  margin: 18px 0;
  min-width: 0;
}
.ai-cost-controls legend {
  font-weight: 700;
}
.ai-cost-controls .grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
#settings-form label {
  margin: 12px 0;
}
#settings-form select {
  width: 100%;
}
@media (max-width: 540px) {
  .ai-cost-controls .grid {
    grid-template-columns: 1fr;
  }
}

.crm-delivery {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  margin: 5px 0;
}
.crm-delivery-sent {
  color: #145833;
  background: #e5f4e9;
  border: 1px solid #8cbfa0;
}
.crm-delivery-not_sent {
  color: #344c5f;
  background: #edf2f6;
  border: 1px solid #b3c3d0;
}
.crm-delivery-unconfirmed {
  color: #784200;
  background: #fff4d6;
  border: 1px solid #dbba70;
}
.crm-row-sent > td:first-child {
  border-left: 3px solid #2f8750;
}
.crm-row-unconfirmed > td:first-child {
  border-left: 3px solid #b57619;
}
.crm-result-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.crm-result-filters button[aria-pressed='true'] {
  background: #e8f4ef;
  border-color: #096452;
  color: #124e3f;
  font-weight: 700;
}
.crm-result-filters span {
  margin-left: 5px;
  font-weight: 700;
}
