/* ===== VARIÁVEIS CSS ===== */
:root {
  /* Cores vibrantes */
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --secondary-color: #ec4899;
  --accent-color: #06b6d4;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;

  /* Gradientes */
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);

  /* Sombras */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.25);

  /* Transparências */
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);

  /* Tipografia */
  --font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===== RESET E BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: #374151;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== NAVEGAÇÃO ===== */
.bg-gradient-primary {
  background: var(--gradient-primary) !important;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
}

.navbar-nav .nav-link {
  font-weight: 500;
  transition: all 0.3s ease;
  border-radius: 8px;
  margin: 0 4px;
}

.navbar-nav .nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

/* ===== LAYOUT PRINCIPAL ===== */
.main-content {
  margin-top: 76px;
  flex: 1;
  padding-bottom: 2rem;
}

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
}

/* ===== AUTENTICAÇÃO ===== */
.auth-container {
  position: relative;
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
  padding: 2rem;
}

.auth-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  box-shadow: var(--shadow-xl);
  position: relative;
  z-index: 10;
  animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo {
  width: 80px;
  height: 80px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: var(--shadow-lg);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.auth-logo i {
  font-size: 2rem;
  color: white;
}

.auth-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  color: #6b7280;
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* ===== FORMULÁRIOS ===== */
.auth-form {
  margin-bottom: 1.5rem;
}

.form-floating {
  position: relative;
}

.form-floating > .form-control {
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem 1rem 1rem 3rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.8);
}

.form-floating > .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  background: white;
}

.form-floating > label {
  padding-left: 3rem;
  color: #6b7280;
  font-weight: 500;
}

.form-floating > label i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  z-index: 5;
}

.password-toggle {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #9ca3af;
  z-index: 10;
  transition: color 0.3s ease;
}

.password-toggle:hover {
  color: var(--primary-color);
}

.password-strength {
  margin-top: 0.5rem;
}

.password-strength-bar {
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.password-strength-fill {
  height: 100%;
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* ===== BOTÕES ===== */
.btn-auth {
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  background: var(--gradient-primary);
  color: white;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
}

.btn-auth:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
}

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

.btn-primary {
  background: var(--gradient-primary);
  border: none;
  border-radius: 10px;
  font-weight: 600;
  padding: 0.625rem 1.25rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* ===== LINKS ===== */
.auth-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.auth-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ===== ANIMAÇÕES DE FUNDO ===== */
.auth-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.floating-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.1;
  animation: float 6s ease-in-out infinite;
}

.shape-1 {
  width: 200px;
  height: 200px;
  background: var(--gradient-primary);
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.shape-2 {
  width: 150px;
  height: 150px;
  background: var(--gradient-secondary);
  top: 60%;
  right: 15%;
  animation-delay: 2s;
}

.shape-3 {
  width: 100px;
  height: 100px;
  background: var(--gradient-success);
  bottom: 20%;
  left: 20%;
  animation-delay: 4s;
}

.shape-4 {
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, var(--warning-color), var(--danger-color));
  top: 30%;
  right: 30%;
  animation-delay: 1s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  33% {
    transform: translateY(-20px) rotate(120deg);
  }
  66% {
    transform: translateY(20px) rotate(240deg);
  }
}

/* ===== CARDS ===== */
.card {
  border: none;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card-header {
  border-radius: 16px 16px 0 0 !important;
  border: none;
  padding: 1.5rem;
}

/* ===== ALERTAS ===== */
.alert {
  border: none;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

.alert-success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
  color: #065f46;
  border-left: 4px solid var(--success-color);
}

.alert-danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.1));
  color: #991b1b;
  border-left: 4px solid var(--danger-color);
}

.alert-warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.1));
  color: #92400e;
  border-left: 4px solid var(--warning-color);
}

.alert-info {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(8, 145, 178, 0.1));
  color: #155e75;
  border-left: 4px solid var(--accent-color);
}

/* ===== PERFIL ===== */
.profile-avatar {
  font-size: 5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

/* ===== FOOTER ===== */
.footer {
  background: rgba(248, 250, 252, 0.8) !important;
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
  .auth-container {
    padding: 1rem;
  }

  .auth-card {
    padding: 2rem 1.5rem;
    border-radius: 20px;
  }

  .auth-title {
    font-size: 1.5rem;
  }

  .floating-shape {
    opacity: 0.05;
  }

  .main-content {
    margin-top: 70px;
  }
}

@media (max-width: 576px) {
  .auth-card {
    padding: 1.5rem 1rem;
  }

  .auth-logo {
    width: 60px;
    height: 60px;
  }

  .auth-logo i {
    font-size: 1.5rem;
  }
}

/* ===== UTILITÁRIOS ===== */
.glass-effect {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shadow-custom {
  box-shadow: var(--shadow-lg);
}

/* ===== ANIMAÇÕES PERSONALIZADAS ===== */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

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

.slide-in-right {
  animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
