/* =========================================
   STYLE.CSS - CLIENT BACKOFFICE
   ========================================= */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap");

/* --- RESET & BODY --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

body {
  background-color: #f0f9ff; /* Azul muito claro */
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

/* --- CONTAINER DE AUTENTICAÇÃO --- */
.auth-container {
  background: white;
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  width: 100%;
  max-width: 420px;
  text-align: center;
  border-top: 5px solid #3b82f6; /* Detalhe azul */
  animation: slideUp 0.5s ease-out;
}

/* --- ÍCONE PRINCIPAL --- */
.icon-wrapper {
  background-color: #eff6ff;
  color: #3b82f6;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem auto;
  font-size: 2rem;
}

/* --- TEXTOS --- */
h2 {
  color: #111827;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

p.subtitle {
  color: #6b7280;
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

/* --- FORMULÁRIOS & INPUTS --- */
.form-group {
  margin-bottom: 1.25rem;
  text-align: left;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.2s;
  outline: none;
  background-color: #f9fafb;
}

input:focus {
  border-color: #3b82f6;
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* --- BOTÕES --- */
button,
.modal-btn,
.modal-btn-input {
  width: 100%;
  padding: 0.875rem;
  background-color: #3b82f6;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-top: 0.5rem;
}

button:hover,
.modal-btn:hover,
.modal-btn-input:hover {
  background-color: #2563eb;
}

/* --- LINKS --- */
.footer-link {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: #6b7280;
}

.footer-link a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 600;
}

.footer-link a:hover {
  text-decoration: underline;
}

.forgot-link {
  display: block;
  text-align: right;
  margin-top: 8px;
  font-size: 0.85rem;
  color: #007bff;
  cursor: pointer;
  text-decoration: none;
}

.forgot-link:hover {
  text-decoration: underline;
}

/* --- INPUTS ESPECIAIS (SENHA E CÓDIGO) --- */
.password-container {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #666;
}

.auth-code-input {
  letter-spacing: 5px;
  text-align: center;
  font-size: 1.2rem;
  font-family: monospace;
}

/* --- LISTA DE REQUISITOS (REGISTO/RESET) --- */
.requirements-list {
  list-style: none;
  padding: 0;
  margin-top: 5px;
  font-size: 0.8rem;
  color: #666;
  text-align: left;
}

.requirements-list li {
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.requirements-list li i {
  font-size: 0.7rem;
}

.valid {
  color: #2ecc71;
}
.invalid {
  color: #e74c3c;
}

#match-feedback {
  font-size: 0.8rem;
  margin-top: 5px;
  text-align: right;
  display: none;
}

/* --- MODAL (OVERLAY DE MENSAGENS) --- */
.custom-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(2px);
}

.custom-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.custom-modal-box {
  background: #fff;
  padding: 40px 30px;
  border-radius: 12px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.custom-modal-overlay.open .custom-modal-box {
  transform: translateY(0) scale(1);
}

.modal-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  display: block;
}

.modal-icon.success {
  color: #2ecc71;
}
.modal-icon.error {
  color: #e74c3c;
}
.modal-icon.info {
  color: #3498db;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 10px;
}

.modal-message {
  font-size: 1rem;
  color: #666;
  margin-bottom: 25px;
  line-height: 1.5;
}

/* Cores específicas dos botões do modal */
.modal-btn.success {
  background: #2ecc71;
}
.modal-btn.success:hover {
  background: #27ae60;
}

.modal-btn.error {
  background: #e74c3c;
}
.modal-btn.error:hover {
  background: #c0392b;
}

.modal-btn.info {
  background: #3498db;
}
.modal-btn.info:hover {
  background: #2980b9;
}

/* --- MODAL DE INPUT (RECUPERAR PASSWORD) --- */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998; /* Z-index ligeiramente menor que o modal de erro/sucesso */
}

.modal-box-input {
  background: white;
  width: 90%;
  max-width: 350px;
  margin: 15% auto;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.modal-box-input input {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* ANIMAÇÃO DE ENTRADA */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
