.overlay {
  position: fixed;
  inset: 0;
  backdrop-filter: blur(8px);
  background: rgba(179, 229, 252, 0.3);
  z-index: 1000;
  display: none;
  animation: fadeIn 0.2s ease-out;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--branco);
  border-radius: 30px;
  padding: 30px;
  width: 90%;
  max-width: 380px;
  border: 5px solid var(--primaria);
  z-index: 1001;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-aviso {
  width: 280px !important;
  max-width: 280px !important;
  padding: 25px !important;
  text-align: center;
}

.modal h3 {
  margin-top: 0;
  color: var(--contraste);
  font-size: 1.3rem;
  text-align: center;
}

.modal p {
  font-size: 0.95rem;
  line-height: 1.4;
}

.modal input, 
.modal textarea,
.modal-select {
  width: 100%;
  margin-bottom: 15px;
  padding: 12px 18px;
  border-radius: 20px;
  border: 3px solid var(--secundaria);
  background: #F0F9FF;
  font-family: inherit;
  outline: none;
  font-size: 1rem;
  color: var(--contraste);
  transition: border-color 0.2s;
}

.modal input:focus, 
.modal-select:focus {
  border-color: var(--primaria);
}

.modal-select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23546E7A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 16px;
}

.submit {
  width: 100%;
  background: var(--primaria);
  border: none;
  padding: 14px;
  border-radius: 20px;
  font-weight: 700;
  color: var(--contraste);
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
  display: block;
}

.submit:active { transform: scale(0.98); }

.close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--secundaria);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--contraste);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.close:hover {
  background: var(--acentuacao);
  color: var(--branco);
  transform: rotate(90deg);
}

#modal-confirmacao, #modal-aviso-login {
  z-index: 1200 !important;
}