/* ==========================================================================
   login.css - Estilos da Tela de Autenticação & Acesso Restrito
   Clube Alphaville Flamboyant Residencial
   ========================================================================== */

:root {
  --primary: #0f766e;
  --primary-hover: #115e59;
  --primary-light: #ccfbf1;
  --primary-border: #99f6e4;
  --accent: #d97706;
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --radius-lg: 16px;
  --radius-md: 10px;
  --shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --transition: all 0.2s ease-in-out;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.login-body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(135deg, #042f2e 0%, #0f766e 50%, #134e4a 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  color: var(--text-main);
}

.login-wrapper {
  width: 100%;
  max-width: 460px;
}

.login-footer {
  margin-top: 24px;
  color: #e2f3f1;
  font-size: 0.82rem;
  line-height: 1.5;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.login-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-header {
  text-align: center;
  margin-bottom: 28px;
}

.login-brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background: #ffffff;
  border-radius: 20px;
  margin-bottom: 14px;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  padding: 8px;
}

.login-brand-icon img,
.login-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.login-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #042f2e;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.login-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.login-alert {
  display: none;
  background: var(--danger-bg);
  color: #991b1b;
  border: 1px solid #fecdd3;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  margin-bottom: 20px;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.login-alert.show {
  display: flex;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 12px;
  font-size: 1rem;
  color: #94a3b8;
  pointer-events: none;
}

.form-input {
  width: 100%;
  padding: 11px 12px 11px 38px;
  font-size: 0.95rem;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text-main);
  transition: var(--transition);
  font-family: inherit;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.btn-toggle-password {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.05rem;
  padding: 4px 6px;
  color: #64748b;
  border-radius: 4px;
}

.btn-toggle-password:hover {
  color: var(--text-main);
}

.login-remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #475569;
  margin-bottom: 22px;
}

.remember-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}

.remember-label input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

.btn-login-submit {
  width: 100%;
  padding: 13px 20px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.25);
}

.btn-login-submit:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 16px rgba(15, 118, 110, 0.35);
  transform: translateY(-1px);
}

.btn-login-submit:active {
  transform: translateY(0);
}

.login-footer-links {
  text-align: center;
  margin-top: 20px;
}

.link-back-form {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  min-height: 44px;
  padding: 4px 8px;
}

.link-back-form:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* ==========================================================================
   RECUPERAÇÃO DE SENHA (FORGOT PASSWORD MODAL & STEPS)
   ========================================================================== */

.link-forgot-password {
  font-size: 0.82rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.link-forgot-password:hover {
  text-decoration: underline;
  color: #0b5e57;
}

.modal-forgot-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease-out;
}

.modal-forgot-overlay.show {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-forgot-card {
  background: #ffffff;
  border-radius: 16px;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  padding: 26px 24px;
  position: relative;
  animation: scaleUp 0.22s ease-out;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.modal-forgot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}

.modal-forgot-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-forgot-icon {
  font-size: 1.3rem;
}

.modal-forgot-title-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.btn-close-forgot {
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 0.95rem;
  cursor: pointer;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-close-forgot:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Barra de Etapas */
.recovery-steps-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 16px 0;
  padding: 0 10px;
}

.recovery-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #e2e8f0;
  transition: var(--transition);
}

.step-lbl {
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
}

.recovery-step-item.active .step-num {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18);
}

.recovery-step-item.active .step-lbl {
  color: var(--primary);
  font-weight: 700;
}

.recovery-step-item.completed .step-num {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
}

.recovery-step-item.completed .step-lbl {
  color: #10b981;
}

.recovery-step-line {
  flex: 1;
  height: 2px;
  background: #e2e8f0;
  margin: 0 8px 16px 8px;
  transition: var(--transition);
}

.recovery-step-line.active {
  background: #10b981;
}

/* Alertas do Modal */
.forgot-alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.84rem;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-weight: 500;
}

.forgot-alert.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecdd3;
}

.forgot-alert.success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.forgot-step-desc {
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 16px;
}

.email-sent-notice {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: #166534;
}

.notice-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.dest-email-highlight {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.92rem;
  margin-top: 2px;
}

.form-hint-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.78rem;
}

.form-hint-text {
  color: #64748b;
}

.btn-link-action {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.78rem;
  cursor: pointer;
  padding: 2px 4px;
  text-decoration: underline;
}

.btn-link-action:hover {
  color: #0b5e57;
}

.recovery-success-icon {
  font-size: 3rem;
  margin-bottom: 10px;
}

.recovery-success-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #166534;
  margin-bottom: 8px;
}

.recovery-success-desc {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.5;
}

@media (max-width: 480px) {
  body.login-body {
    padding: 16px 12px;
  }
  .login-card {
    padding: 24px 18px;
    border-radius: 14px;
  }
  .demo-grid {
    grid-template-columns: 1fr;
  }
  .btn-demo-account {
    min-height: 44px;
  }
  .modal-forgot-card {
    padding: 20px 16px;
  }
  .step-lbl {
    display: none;
  }
}
