/* RODE — Modais */

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.hidden { display: none; }

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

.modal-content {
  position: relative;
  background: var(--cor-surface);
  border-radius: var(--raio);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
  z-index: 1;
  animation: modal-in 0.2s ease;
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(0.96) translateY(-8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--cor-borda);
}

.modal-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--cor-texto-secundario);
  padding: 0.2rem 0.4rem;
  border-radius: var(--raio-sm);
  transition: background 0.15s;
}
.modal-close:hover { background: var(--cor-bg); }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--cor-borda);
}

/* Toast notifications */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 380px;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: var(--cor-surface);
  border: 1px solid var(--cor-borda);
  border-radius: var(--raio);
  padding: 0.75rem 1rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  font-size: 0.875rem;
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.25s ease;
  border-left: 4px solid;
}

.toast-visible { opacity: 1; transform: translateX(0); }

.toast-success { border-left-color: var(--cor-sucesso); }
.toast-error { border-left-color: var(--cor-perigo); }
.toast-warning { border-left-color: var(--cor-aviso); }
.toast-info { border-left-color: var(--cor-info); }

.toast-icon { font-size: 1rem; flex-shrink: 0; }
.toast-msg { flex: 1; }
.toast-close {
  background: none; border: none; cursor: pointer;
  font-size: 1.1rem; color: var(--cor-texto-secundario); padding: 0;
  flex-shrink: 0;
}

/* Login */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 64px);
  padding: 2rem;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--cor-surface);
  border: 1px solid var(--cor-borda);
  border-radius: var(--raio);
  padding: 2.5rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}
.login-logo h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--cor-primaria);
  letter-spacing: -1px;
}
.login-logo p {
  color: var(--cor-texto-secundario);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}
