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

:root {
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --secondary-color: #f8fafc;
  --accent-color: #06b6d4;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1),
    0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1),
    0 8px 10px -6px rgb(0 0 0 / 0.1);
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
}

/* Animated Background */
.particles-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: float 15s infinite linear;
}

.particle:nth-child(1) {
  left: 10%;
  animation-delay: 0s;
}

.particle:nth-child(2) {
  left: 30%;
  animation-delay: 2s;
}

.particle:nth-child(3) {
  left: 50%;
  animation-delay: 4s;
}

.particle:nth-child(4) {
  left: 70%;
  animation-delay: 6s;
}

.particle:nth-child(5) {
  left: 90%;
  animation-delay: 8s;
}

@keyframes float {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}

/* Main Container */
.modern-login-container {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

/* Login Form Section */
.login-form-section {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.login-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 100%;
  max-width: 540px;
  animation: slideInUp 0.6s ease-out;
}

div#senha-error {
  box-shadow: none !important;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Login Header */
.login-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.logo-container {
  margin-bottom: 1.5rem;
}

.logo {
  max-height: 60px;
  width: auto;
}

.welcome-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.welcome-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 0;
  font-weight: 400;
}

/* Modern Form Inputs */
.form-floating {
  position: relative;
}

.modern-input {
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem 1rem 1rem 3rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  left: -28px;
}

.modern-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  background: rgba(255, 255, 255, 0.95);
}

.form-floating > label {
  padding-left: 3rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.form-floating.focused > label,
.form-floating > .modern-input:focus ~ label,
.form-floating > .modern-input:not(:placeholder-shown) ~ label {
  color: var(--primary-color);
  left: -28px;
}

/* Password Field */
.password-field {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 1rem;
  top: 30px;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  z-index: 10;
  padding: 0.5rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.password-toggle:hover {
  color: var(--primary-color);
  background: rgba(99, 102, 241, 0.1);
}

/* Modern Button */
.modern-btn {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  border: none;
  border-radius: 12px;
  padding: 0.875rem 2rem;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.modern-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

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

.modern-btn.loading {
  pointer-events: none;
}

.modern-btn.success {
  background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
}

/* Form Elements */
.form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.forgot-password-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  border: none;
  background: none;
}

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

/* Hero Section */
.hero-section {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.1) 0%,
    rgba(118, 75, 162, 0.1) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

.hero-content {
  text-align: center;
  max-width: 500px;
  position: relative;
  z-index: 2;
}

.hero-illustration {
  position: relative;
  margin-bottom: 3rem;
  height: 200px;
}

.floating-card {
  position: absolute;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  animation: floatCard 6s ease-in-out infinite;
}

.floating-card i {
  font-size: 1.25rem;
  color: var(--primary-color);
}

.card-1 {
  top: 20px;
  left: 20px;
  animation-delay: 0s;
}

.card-2 {
  top: 80px;
  right: 20px;
  animation-delay: 2s;
}

.card-3 {
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  animation-delay: 4s;
}

@keyframes floatCard {
  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0;
}

/* Modern Modals */
.modern-modal {
  border-radius: 20px;
  border: none;
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(20px);
}

.modern-modal .modal-header {
  padding: 2rem 2rem 1rem;
}

.modern-modal .modal-body {
  padding: 1rem 2rem;
}

.modern-modal .modal-footer {
  padding: 1rem 2rem 2rem;
}

.modern-alert {
  border-radius: 12px;
  border: none;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
}

.modern-alert .btn-close {
  margin-left: auto;
}

.is-invalid {
  border-color: var(--error-color) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.is-valid {
  border-color: var(--success-color) !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

.invalid-feedback {
  color: var(--error-color);
  font-size: 0.875rem;
  margin-top: 0.5rem;
  font-weight: 500;
}

.btn-loader .spinner-border {
  width: 1rem;
  height: 1rem;
}
.swal-custom {
  border-radius: 16px !important;
}

@media (max-width: 768px) {
  .login-card {
    padding: 2rem 1.5rem;
    margin: 1rem;
    border-radius: 20px;
  }

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

  .hero-title {
    font-size: 2rem;
  }

  .hero-section {
    padding: 2rem 1rem;
  }

  .floating-card {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 576px) {
  .modern-login-container {
    padding: 1rem 0;
  }

  .login-card {
    margin: 0.5rem;
    padding: 1.5rem 1rem;
  }

  .welcome-title {
    font-size: 1.375rem;
  }
}
