* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #000000;
  color: #f2f5f3;
  line-height: 1.5;
}

header {
  background: # #000000;
  border-bottom: 1px solid #29332e;
  padding: 28px 20px;
}

header h1 {
  margin: 0 0 6px;
  font-size: 64px;
  letter-spacing: -0.5px;
  color: #3f5f46;
  text-align: center;
}

header p {
  margin: 0;
  color: #3f5f46;
  font-size: 15px;
  text-align: center;
}

main {
  width: min(100% - 32px, 960px);
  margin: 40px auto;
}

section {
  margin-bottom: 32px;
}

h2 {
  margin: 0 0 18px;
  font-size: 22px;
}

h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

a {
  color: #79c29c;
}

form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  background: #000000;
  padding: 24px;
  border: 1px solid #29332e;
  border-radius: 16px;
}

form label {
  display: block;
  margin-top: 8px;
}

form input {
  display: block;
  margin-top: 8px;
}

label {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 600;
}

input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #37433d;
  border-radius: 10px;
  background: #111613;
  color: #f2f5f3;
  font-size: 15px;
  outline: none;
}

input::placeholder {
  color: #718078;
}

input:focus {
  border-color: #5fa982;
  box-shadow: 0 0 0 3px rgba(95, 169, 130, 0.12);
}

button {
  border: 0;
  border-radius: 10px;
  padding: 12px 20px;
  background: #4f8f73;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  background: #5fa982;
}

#results {
  display: grid;
  gap: 14px;
}

body.search-results {
  background: #e8f5ec;
}

body.search-results form {
  background: #e8f5ec;
}

body.search-results form label {
  color: #000000;
}

body.search-results form input {
  background: #ffffff;
  color: #000000;
}

body.search-results form button {
  background: #3f5f46;
  color: #ffffff;
}

body.search-results form button:hover {
  background: #2f4836;
}

body.search-results form {
  background: #e8f5ec;
}

body.search-results form label {
  color: #000000;
}

body.search-results form input {
  background: #ffffff;
  color: #000000;
}

.vet-card {
  color: #182c20;
  background: #e5e5e5;
  border: 1px solid #dfe8e2;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

/* Resultado da busca */

.vet-result-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 20px;
  align-items: start;
}

.vet-result-content {
  grid-column: 1;
  min-width: 0;
}

.vet-result-photo-wrapper {
  grid-column: 2;
  grid-row: 1;
  width: 170px;
  height: 170px;
}

.vet-result-photo {
  display: block;
  width: 170px;
  height: 170px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid #29332e;
}

.vet-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
  color: #3f5f46;
}

.vet-card p {
  margin: 5px 0;
  color: #3f5f46;
}

.vet-profile-header {
  margin-bottom: 28px;
}

.vet-profile-header h2 {
  margin-bottom: 6px;
  font-size: 30px;
  letter-spacing: -0.5px;
}

.vet-specialty {
  margin: 0 0 4px;
  color: #79c29c;
  font-size: 17px;
  font-weight: 600;
}

.vet-city {
  margin: 0;
  color: #aab7b0;
}

.vet-photo {
  display: block;
  width: 120px;
  height: 120px;
  margin-bottom: 20px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid #37433d;
  background: #111613;
}

.vet-section {
  padding: 20px 0;
  border-top: 1px solid #29332e;
}

.vet-section p {
  margin: 0;
  color: #3f5f46;
}

.contact-section {
  padding: 22px 0;
  border-top: 1px solid #29332e;
  border-bottom: 1px solid #29332e;
}

.contact-section h3 {
  font-size: 18px;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.whatsapp-button,
.phone-button {
  display: inline-block;
  padding: 11px 16px;
  border-radius: 10px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.15s ease, transform 0.15s ease;
}

.whatsapp-button {
  background: #3f5f46;
}

.whatsapp-button:hover {
  background: #5fa982;
  transform: translateY(-1px);
}

.phone-button {
  background: #3f5f46;
}

.phone-button:hover {
  background: #4a5851;
  transform: translateY(-1px);
}

.external-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.external-links a {
  color: #79c29c;
  font-weight: 600;
  text-decoration: none;
}

.external-links a:hover {
  text-decoration: underline;
}

.vet-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.vet-metrics > div {
  padding: 16px;
  border: 1px solid #29332e;
  border-radius: 12px;
  background: #151b18;
}

.vet-metrics strong {
  display: block;
  margin-bottom: 3px;
  color: #79c29c;
  font-size: 22px;
}

.vet-metrics span {
  color: #89968f;
  font-size: 13px;
}

.details-button {
  display: inline-block;
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 9px;
  background: #2f4836;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.details-button:hover {
  background: #37433d;
}

.logo-link {
  color: inherit;
  text-decoration: none;
}

.logo-link:hover {
  color: inherit;
}

/* Área do perfil do veterinário */

#profile-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  background: #191f1c;
  padding: 28px;
  border: 1px solid #29332e;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
}

#profile-form .field {
  min-width: 0;
}

#profile-form .field:last-of-type {
  grid-column: 1 / -1;
}

#profile-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #37433d;
  border-radius: 10px;
  background: #111613;
  color: #f2f5f3;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  resize: vertical;
  outline: none;
}

#profile-form textarea:focus {
  border-color: #5fa982;
  box-shadow: 0 0 0 3px rgba(95, 169, 130, 0.12);
}

#profile-form > button {
  grid-column: 1 / -1;
  justify-self: start;
}

#profile-form .gallery-actions {
  margin-top: 8px;
}

#profile-form .gallery-actions button {
  width: auto;
}

#add-gallery-photo {
  width: auto;
  margin-top: 8px;
  padding: 12px 20px;
}

#profile-status {
  min-height: 24px;
  margin-top: 16px;
  color: #79c29c;
  font-weight: 600;
}

#profile-form input[type="checkbox"] {
  width: auto;
  padding: 0;
  margin: 0 8px 0 0;
  display: inline-block;
  vertical-align: middle;
}

#profile-form .field label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  font-weight: 400;
}

#add-gallery-photo {
  margin-top: 8px;
  width: auto;
  padding: 10px 16px;
}

#gallery-photos {
  margin-top: 12px;
}

#profile-form .gallery-actions {
  margin-top: 8px;
}

#profile-form .gallery-actions button {
  width: auto;
}

#profile-form .gallery-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

#profile-form .gallery-input-row input {
  flex: 1;
}

#profile-form .gallery-input-row button {
  width: auto;
  flex-shrink: 0;
}

#profile-form .gallery-field {
  grid-column: 1 / -1;
}

#profile-form .file-button {
  display: inline-block;
  width: fit-content;
  margin-top: 8px;
  padding: 11px 18px;
  border-radius: 10px;
  background: #4f8f73;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

#profile-form .file-button:hover {
  background: #5fa982;
  transform: translateY(-1px);
}

#profile-form #photo-file-name,
#profile-form #gallery-file-name {
  display: inline-block;
  margin-left: 10px;
  color: #aeb8b2;
  font-size: 14px;
  vertical-align: middle;
}

#profile-form input[type="file"] {
  display: none !important;
}

/* Responsividade */

@media (max-width: 700px) {
  form {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }

  main {
    width: min(100% - 24px, 960px);
    margin: 24px auto;
  }

  header {
    padding: 24px 16px;
  }

  .vet-card {
    padding: 20px;
  }

  .vet-profile-header h2 {
    font-size: 25px;
  }

  .vet-photo {
    width: 96px;
    height: 96px;
  }

  .vet-metrics {
    grid-template-columns: 1fr;
  }

  .vet-result-card {
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 14px;
}

.vet-result-photo-wrapper {
  width: 96px;
  height: 96px;
}

.vet-result-photo {
  width: 96px;
  height: 96px;
  border-radius: 12px;
}

  #profile-form {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  #profile-form .field:last-of-type,
  #profile-form button {
    grid-column: auto;
  }

  #profile-form button {
    width: 100%;
  }

  #profile-form .file-button {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
  }

  #profile-form #photo-file-name,
  #profile-form #gallery-file-name {
    display: block;
    margin: 8px 0 0;
  }
}

.vet-area-link {
  margin: 20px 0 0;
}

.vet-area-link a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 190px;
  min-height: 42px;
  padding: 10px 18px;
  box-sizing: border-box;
  border: 1px solid #3f8f63;
  border-radius: 10px;
  background: #3f8f63;
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.vet-area-link a:hover {
  background: #347a54;
  border-color: #347a54;
  transform: translateY(-1px);
}

.vet-area-link a:focus-visible {
  outline: 3px solid rgba(63, 143, 99, 0.35);
  outline-offset: 2px;
}

.dashboard-summary {
  margin-bottom: 24px;
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.dashboard-metric {
  padding: 20px;
  border: 1px solid #29332e;
  border-radius: 14px;
  background: #111614;
}

.dashboard-metric-label {
  display: block;
  margin-bottom: 8px;
  color: #aeb8b2;
  font-size: 14px;
}

.dashboard-metric strong {
  display: block;
  font-size: 32px;
  line-height: 1;
  color: #ffffff;
}

@media (max-width: 700px) {
  .dashboard-metrics {
    grid-template-columns: 1fr;
  }
}
/* Public search keeps all filters usable on narrow screens. */
form select { display: block; width: 100%; min-height: 44px; margin-top: 8px; padding: 10px; border-radius: 8px; border: 1px solid #ccc; background: #fff; color: #20382e; }
form .field { min-width: 0; }
