/* Phase BA: rate card search and premium light polish */
.qf-rate-searchbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 8px 0 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,.024);
}

.qf-rate-searchbar strong {
  display: block;
  color: var(--ink, #0f172a);
  font-size: 15px;
  letter-spacing: -0.02em;
}

.qf-rate-searchbar div span,
.qf-rate-searchbar label span {
  display: block;
  color: var(--muted, #536174);
  font-size: 12px;
}

.qf-rate-searchbar label {
  display: grid;
  gap: 5px;
}

.qf-rate-searchbar input {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-btn);
  background: var(--surface-2);
  color: var(--ink);
  padding: 10px 13px;
  font-size: 13.5px;
  outline: none;
}

.qf-rate-searchbar input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.qf-rate-search-count {
  justify-self: end;
  border: 1px solid rgba(51, 86, 238, 0.28);
  border-radius: var(--radius-btn);
  background: var(--accent-soft);
  color: var(--accent);
  padding: 8px 11px;
  font-size: 12px;
  white-space: nowrap;
}

.qf-rate-search-hidden {
  display: none !important;
}

.qf-rate-search-empty {
  margin: 0 0 12px;
  border: 1px dashed var(--border-strong);
  border-radius: 16px;
  padding: 12px 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
}

html[data-theme="light"] .qf-builder-hero {
  border-bottom-color: rgba(184, 207, 245, 0.72);
}
html[data-theme="light"] .qf-rate-searchbar {
  border-color: rgba(184, 207, 245, 0.72);
  background: #ffffff;
  box-shadow: var(--qf-shadow-md);
}

html[data-theme="light"] .qf-rate-scan-stats button,
html[data-theme="light"] .qf-rate-row-status {
  border-color: rgba(184, 207, 245, 0.74);
  background: rgba(255, 255, 255, 0.84);
}

html[data-theme="light"] .qf-builder-actions button {
  border-color: rgba(184, 207, 245, 0.84);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink, #0f172a);
}

html[data-theme="light"] .qf-builder-actions button:hover,
html[data-theme="light"] .qf-rate-scan-stats button:hover,
html[data-theme="light"] .qf-rate-scan-stats button.active {
  border-color: rgba(59, 34, 244, 0.28);
  background: rgba(59, 34, 244, 0.08);
  color: var(--accent, #3b22f4);
}

html[data-theme="light"] .qf-rate-table-wrap::before {
  background: #ffffff;
  border-color: rgba(184, 207, 245, 0.74);
  color: var(--accent, #3b22f4);
}

/* The rate-cards service filter tabs reuse the shared `.qf-tabs` class, which
   the customer-widget theme (freight-premium-theme.css) paints light (#eff6ff)
   via an unscoped rule that also loads on the dashboard. Re-assert the dark
   dashboard treatment here with page-scoped specificity so the tab strip stays
   on the dark surface. Dashboard-only file; does not affect the widget. */
.qf-rate-card-search-page .qf-tabs {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
}
.qf-rate-card-search-page .qf-tab.active {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--accent);
}

@media (max-width: 900px) {
  .qf-rate-searchbar {
    grid-template-columns: 1fr;
  }
  .qf-rate-search-count {
    justify-self: start;
  }
}
