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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #0047ba 0%, #006548 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Elementos decorativos de fondo */
body::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(128, 188, 0, 0.1) 0%, transparent 70%);
  transform: rotate(45deg);
}

body::after {
  content: "";
  position: absolute;
  bottom: -50%;
  left: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(23, 77, 252, 0.1) 0%, transparent 70%);
  transform: rotate(-45deg);
}

.login-container {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  padding: 60px 50px;
  width: 100%;
  max-width: 450px;
  text-align: center;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.logo-container {
  margin-bottom: 40px;
}

.logo {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #0047ba, #80bc00);
  border-radius: 20px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 8px 25px rgba(0, 71, 186, 0.3);
}

.logo::before {
  content: "";
  width: 40px;
  height: 40px;
  background: #ffffff;
  border-radius: 8px;
  position: relative;
}

.company-name {
  font-size: 28px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.company-subtitle {
  font-size: 16px;
  color: #9a9ea1;
  font-weight: 400;
  margin-bottom: 40px;
}

.welcome-text {
  font-size: 24px;
  font-weight: 600;
  color: #000000;
  margin-bottom: 12px;
}

.description {
  font-size: 16px;
  color: #9a9ea1;
  margin-bottom: 40px;
  line-height: 1.5;
}

/* Mensajes flash */
.flash-messages {
  margin-bottom: 20px;
}

.flash-message {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 500;
}

.flash-success {
  background-color: rgba(128, 188, 0, 0.1);
  color: #006548;
  border: 1px solid rgba(128, 188, 0, 0.3);
}

.flash-info {
  background-color: rgba(0, 71, 186, 0.1);
  color: #0047ba;
  border: 1px solid rgba(0, 71, 186, 0.3);
}

.flash-danger {
  background-color: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  border: 1px solid rgba(220, 53, 69, 0.3);
}

.login-button {
  width: 100%;
  padding: 18px 24px;
  background: linear-gradient(135deg, #0047ba 0%, #174dfc 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 71, 186, 0.3);
}

.login-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.login-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(0, 71, 186, 0.4);
}

.login-button:hover::before {
  left: 100%;
}

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

.microsoft-icon {
  display: inline-block;
  margin-right: 12px;
  width: 20px;
  height: 20px;
  vertical-align: middle;
}

.security-info {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid #f0f0f0;
}

.security-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(128, 188, 0, 0.1);
  color: #006548;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 12px;
}

.security-text {
  font-size: 14px;
  color: #9a9ea1;
  line-height: 1.4;
}

.loading {
  display: none;
  margin-left: 8px;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Partículas flotantes */
.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(128, 188, 0, 0.3);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

/* Estilos para el enlace de volver */
.back-link-container {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.back-link {
  color: #666;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.back-link:hover {
  color: #0047ba;
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 480px) {
  .login-container {
    margin: 20px;
    padding: 40px 30px;
  }

  .company-name {
    font-size: 24px;
  }

  .welcome-text {
    font-size: 20px;
  }
}
