/* ══════════════════════════════════════════════
   FORMULÁRIO DE PACIENTES - ESTILOS MODERNOS
══════════════════════════════════════════════ */

/* Reset de estilos antigos */
.form-container input,
.form-container select,
.form-container textarea {
  border: none !important;
  border-radius: 0 !important;
  background: white !important;
  box-shadow: none !important;
}

/* Inputs modernos */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="tel"],
input[type="url"],
input[type="datetime-local"],
input[type="search"],
select,
textarea {
  width: 100% !important;
  padding: 13px 16px !important;
  border: 2px solid #e2e8f0 !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
  background: #ffffff !important;
  color: #0f172a !important;
  transition: all 0.2s ease !important;
  outline: none !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  font-weight: 500 !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04) !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  min-height: 47px !important;
  box-sizing: border-box !important;
}

/* Placeholders */
input::placeholder,
textarea::placeholder,
select::placeholder {
  color: #94a3b8 !important;
  font-weight: 400 !important;
  opacity: 1 !important;
}

/* Focus state */
input:focus,
select:focus,
textarea:focus {
  border-color: #4f46e5 !important;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1) !important;
  background: #ffffff !important;
}

/* Hover state */
input:hover:not(:focus):not(:disabled),
select:hover:not(:focus):not(:disabled),
textarea:hover:not(:focus):not(:disabled) {
  border-color: #c7d2fe !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
}

/* Select customizado */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10' viewBox='0 0 16 10'%3E%3Cpath d='M1.5 1.5l6.5 7 6.5-7' stroke='%234f46e5' stroke-width='2.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 16px center !important;
  background-size: 16px !important;
  padding-right: 40px !important;
  cursor: pointer !important;
}

/* WebKit autofill */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 30px #eff6ff inset !important;
  -webkit-text-fill-color: #0f172a !important;
  caret-color: #0f172a !important;
}

/* Textarea */
textarea {
  resize: vertical !important;
  min-height: 140px !important;
}

/* Labels */
.form-section label {
  display: block !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #1a202c !important;
  margin-bottom: 7px !important;
  letter-spacing: 0.01em !important;
  line-height: 1.4 !important;
}

/* Form sections */
.form-section {
  margin-bottom: 28px !important;
}

.form-section-title {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  margin-bottom: 20px !important;
  padding-bottom: 10px !important;
  border-bottom: 2px solid #eef2ff !important;
  letter-spacing: -0.01em !important;
}

/* Grid para endereços */
.address-grid {
  display: grid !important;
  grid-template-columns: repeat(12, 1fr) !important;
  gap: 20px !important;
  margin-bottom: 20px !important;
}

.address-city {
  grid-column: span 6 !important;
}

.address-uf-cep {
  grid-column: span 6 !important;
}

.uf-row {
  display: flex !important;
  gap: 14px !important;
}

.uf-row input:first-child {
  width: 80px !important;
  flex-shrink: 0 !important;
}

.uf-row input:last-child {
  flex: 1 !important;
}

/* Data do calendário */
input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer !important;
  border-radius: 8px !important;
  padding: 4px 8px !important;
  margin-right: 6px !important;
  background: #eef2ff !important;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
  background: #e0e7ff !important;
}

/* Botões */
.form-actions {
  margin-top: 32px !important;
  padding-top: 24px !important;
  border-top: 1.5px solid #e2e8f0 !important;
  display: flex !important;
  gap: 14px !important;
  flex-wrap: wrap !important;
}

/* Validação de e-mail */
.input-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1) !important;
}

.error-message {
  color: #ef4444 !important;
  font-size: 12px !important;
  margin-top: 4px !important;
  display: none !important;
}

.error-message.show {
  display: block !important;
}

/* Container do formulário */
.form-container {
  max-width: 920px !important;
  margin: 0 auto !important;
}

/* Grid de campos */
.grid2 {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 20px !important;
  margin-bottom: 20px !important;
}

.grid2 > div {
  display: flex !important;
  flex-direction: column !important;
}

@media (max-width: 900px) {
  .grid2 {
    grid-template-columns: 1fr !important;
  }
  .address-city {
    grid-column: span 12 !important;
  }
  .address-uf-cep {
    grid-column: span 12 !important;
  }
  .uf-row {
    flex-direction: column !important;
  }
}
