/* web/css/pages/patients.css */

/* Tarja azul no título (igual Perfil/Prescrições) */
#patientsHome > h3,
#patientDetails > h3,
#patientForm > h3 {
  display: block;
  width: 100%;
  background: #0b7285;
  color: #fff;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .6px;
  font-size: 14px;
  padding: 12px 14px;
  margin: -16px -16px 14px;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}

.patients-toolbar {
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

#patientSearch {
  flex: 1;
  min-width: 280px;
  height: 40px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.16);
  background: #fff;
  outline: none;
}

#patientSearch:focus {
  border-color: rgba(14,165,233,.65);
  box-shadow: 0 0 0 3px rgba(14,165,233,.12);
}

.patient-list {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  padding: 6px;
  max-height: 420px;
  overflow: auto;
}

/* rows */
.patient-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  padding: 12px;
  margin: 6px;
  border-radius: 12px;
  border: 1px solid #f1f5f9;
  background: #fff;

  transition: background .15s ease, box-shadow .15s ease, transform .05s ease;
}

.patient-row:hover {
  background: #f8fafc;
  box-shadow: 0 1px 0 rgba(0,0,0,.03);
}

.patient-row:active {
  transform: scale(.995);
}

.patient-name {
  font-weight: 800;
  color: #0f172a;
}

.patient-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

#patientsHome button,
#patientDetails button,
#patientForm button {
  height: 40px;
  border-radius: 12px;
  font-weight: 800;
}

/* detalhes */
.patient-details {
  padding: 4px 2px;
}

.patient-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}

.patient-details-grid .k {
  font-weight: 900;
  color: #0f172a;
}

.patient-details-grid .v {
  color: #334155;
  font-weight: 600;
}

.patient-details-grid .pre {
  white-space: pre-wrap;
}

/* form */
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 860px) {
  .patient-details-grid,
  .grid2 {
    grid-template-columns: 1fr;
  }
}

.label {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 6px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .4px;
}

#patientForm input,
#patientForm textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.16);
  outline: none;
  padding: 10px 12px;
}

#patientForm textarea {
  min-height: 90px;
  resize: vertical;
}

#patientForm input:focus,
#patientForm textarea:focus {
  border-color: rgba(14,165,233,.65);
  box-shadow: 0 0 0 3px rgba(14,165,233,.12);
}
