html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

h1 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.35rem;
}

.search-panel {
  max-width: 900px;
}

.search-form {
  display: flex;
  gap: .75rem;
  align-items: center;
}

.search-form input,
.inline-form input {
  border: 1px solid #b9c0c9;
  border-radius: 6px;
  padding: .65rem .75rem;
}

.search-form input {
  flex: 1;
  min-width: 240px;
}

button {
  border: 0;
  border-radius: 6px;
  background: #14532d;
  color: white;
  padding: .65rem 1rem;
}

.secondary-button {
  background: #64748b;
}

.clear-form {
  margin-top: .65rem;
}

.search-indicator,
.verification-note {
  color: #6b3f00;
  background: #fff4d6;
  border: 1px solid #f2d58a;
  border-radius: 6px;
  margin-top: 1rem;
  padding: .75rem;
}

.search-indicator {
  display: flex;
  gap: .6rem;
  align-items: center;
}

.spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid #f2d58a;
  border-top-color: #8a4a00;
  border-radius: 50%;
  display: inline-block;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: .75rem;
}

.section-title-row h2 {
  margin-bottom: 0;
}

.result-count {
  color: #475569;
  background: #eef2f7;
  border-radius: 999px;
  font-weight: 700;
  padding: .35rem .7rem;
  white-space: nowrap;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .75rem;
}

.summary-grid div,
.result-card {
  border: 1px solid #d8dee8;
  border-radius: 8px;
  padding: .9rem;
}

.summary-grid strong,
.summary-grid span {
  display: block;
}

.result-list {
  display: grid;
  gap: .85rem;
}

.result-card h3 {
  font-size: 1.05rem;
  margin: .4rem 0;
}

.result-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.result-details {
  margin-top: .55rem;
}

.result-details p {
  margin-bottom: .55rem;
}

.match-badge {
  border-radius: 999px;
  font-weight: 700;
  padding: .3rem .65rem;
  white-space: nowrap;
}

.result-perfect {
  background: #f2fbf5;
  border-color: #8bd7a5;
}

.result-review {
  background: #fffaf0;
  border-color: #f3c36b;
}

.result-partial {
  background: #f7f8fb;
  border-color: #cfd7e6;
}

.result-catalogue {
  background: #f7fbff;
  border-color: #b9d7f5;
}

.badge-perfect {
  background: #d8f7e2;
  color: #116231;
}

.badge-review {
  background: #ffe7bd;
  color: #8a4a00;
}

.badge-partial {
  background: #e8edf5;
  color: #334155;
}

.badge-catalogue {
  background: #dceeff;
  color: #174f82;
}

.drug-code {
  display: inline-block;
  background: #0f172a;
  color: white;
  border-radius: 6px;
  padding: .25rem .5rem;
  font-weight: 700;
}

.drug-code-cell {
  font-weight: 700;
  color: #0f172a;
}

.inline-form {
  display: flex;
  gap: .5rem;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}
