/* Páginas de Autenticação - Login e Registro */

/* Reset de margens para páginas de autenticação */
* {
  box-sizing: border-box;
}

html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  min-height: 100vh !important;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

.auth-container {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: clamp(1.5rem, 4vw, 2.5rem) 1rem;
  margin: 0;
  overflow: hidden;
}

.auth-container::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: pulse 20s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.auth-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  padding: 3rem;
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(10px);
  margin: 0;
  box-sizing: border-box;
}

.auth-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.auth-logo {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: white;
  font-size: 2rem;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.auth-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  color: #718096;
  font-size: 0.95rem;
}

.auth-form {
  margin-top: 2rem;
}

.auth-form-group {
  margin-bottom: 1.5rem;
}

.auth-form-label {
  display: block;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.auth-form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.2s ease;
  background: #f7fafc;
}

.auth-form-input:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.auth-form-input:focus-visible {
  outline: none;
}

.auth-form-input::placeholder {
  color: #a0aec0;
}

.auth-input-wrap {
  position: relative;
}

.auth-input-wrap .auth-form-input {
  padding-right: 5.5rem;
}

.auth-input-action {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #667eea;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.25rem 0.5rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.auth-input-action:hover {
  background: rgba(102, 126, 234, 0.10);
  color: #764ba2;
}

.auth-input-action:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.22);
}

.auth-btn {
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  margin-top: 0.5rem;
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.auth-btn:active {
  transform: translateY(0);
}

.auth-form-submit {
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  margin-top: 0.5rem;
}

.auth-form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
  color: white;
}

.auth-form-submit--secondary {
  background: #f7fafc;
  color: #4a5568;
  border: 2px solid #e2e8f0;
  box-shadow: none;
  margin-top: 0;
}

.auth-form-submit--secondary:hover {
  background: #edf2f7;
  border-color: #cbd5e0;
  color: #2d3748;
}

.auth-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.35), 0 0 0 7px rgba(102, 126, 234, 0.35);
}

.auth-btn.is-loading {
  cursor: progress;
  transform: none;
}

.auth-btn.is-loading::after {
  content: '';
  width: 1rem;
  height: 1rem;
  display: inline-block;
  margin-left: 0.75rem;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-top-color: rgba(255, 255, 255, 1);
  vertical-align: -0.2em;
  animation: authSpin 0.8s linear infinite;
}

@keyframes authSpin {
  to { transform: rotate(360deg); }
}

.auth-alert {
  padding: 0.875rem 1rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  border: 2px solid;
}

.auth-alert-danger {
  background: #fed7d7;
  border-color: #fc8181;
  color: #c53030;
}

.auth-alert-success {
  background: #c6f6d5;
  border-color: #68d391;
  color: #22543d;
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 2rem 0;
  color: #a0aec0;
  font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.auth-divider span {
  padding: 0 1rem;
}

.auth-footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e2e8f0;
}

.auth-footer-text {
  color: #718096;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.auth-footer-link {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.auth-footer-link:hover {
  color: #764ba2;
  text-decoration: underline;
}

.auth-hint {
  font-size: 0.8rem;
  color: #a0aec0;
  margin-top: 0.5rem;
  padding: 0.75rem;
  background: #f7fafc;
  border-radius: 8px;
  border-left: 3px solid #cbd5e0;
}

/* Responsivo */
@media (max-width: 576px) {
  .auth-card {
    padding: 2rem 1.5rem;
    border-radius: 16px;
  }
  
  .auth-title {
    font-size: 1.5rem;
  }
  
  .auth-logo {
    width: 56px;
    height: 56px;
    font-size: 1.75rem;
  }
}

/* Animações de entrada */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-card {
  animation: fadeInUp 0.5s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .auth-container::before {
    animation: none;
  }
  .auth-card {
    animation: none;
  }
  .auth-form-input,
  .auth-btn,
  .auth-input-action {
    transition: none;
  }
  .auth-btn.is-loading::after {
    animation: none;
  }
}

