:root {
  --accent: #1f3a93;
  --accent-ink: #fff;
  --text: #1a1a1a;
  --muted: #6b7280;
  --border: #e2e5ea;
  --bg: #f6f7f9;
  --card: #fff;
  --danger: #b91c1c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.4;
}

.topbar {
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.75rem 0;
}
.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.env-badge {
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.15);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}

.search-form {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 0.75rem 1rem;
  background: var(--card);
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  align-items: end;
}
.field {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
  color: var(--muted);
  gap: 0.25rem;
}
.field-wide { grid-column: span 2; }
.field > span { font-weight: 500; }
.field input,
.field select {
  font: inherit;
  color: var(--text);
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}
.field input:focus,
.field select:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}

#search-button {
  font: inherit;
  font-weight: 600;
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  padding: 0.65rem 1.4rem;
  border-radius: 6px;
  cursor: pointer;
  min-height: 2.4rem;
}
#search-button:hover { filter: brightness(1.08); }
#search-button:disabled { opacity: 0.6; cursor: wait; }

.status {
  margin-top: 1rem;
  min-height: 1.2rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.status.error { color: var(--danger); }

.results {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}
.provider-card {
  display: flex;
  gap: 0.9rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
}
.provider-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  background: #e5e7eb;
  flex-shrink: 0;
}
.provider-photo.placeholder {
  display: grid;
  place-items: center;
  color: #9ca3af;
  font-size: 1.6rem;
  font-weight: 600;
}
.provider-body { min-width: 0; flex: 1; }
.provider-name {
  font-size: 1.05rem;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 0.15rem;
}
.provider-specialty {
  color: var(--text);
  margin: 0 0 0.25rem;
}
.provider-location {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}
.provider-pill {
  display: inline-block;
  font-size: 0.75rem;
  background: #eef2ff;
  color: var(--accent);
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  margin-top: 0.4rem;
}

.empty {
  grid-column: 1 / -1;
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
  color: var(--muted);
}

.footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer a { color: var(--accent); }

@media (max-width: 720px) {
  .search-form {
    grid-template-columns: 1fr 1fr;
  }
  .field-wide { grid-column: span 2; }
  #search-button { grid-column: span 2; }
}
