@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: linear-gradient(135deg, #0a1d44 0%, #1a3a6e 100%);
  font-family: "Inter", sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

/* Animated background shapes */
body::before,
body::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  opacity: 0.1;
  animation: float 20s infinite ease-in-out;
}

body::before {
  width: 400px;
  height: 400px;
  background: #ff5a00;
  top: -100px;
  left: -100px;
  animation-delay: -5s;
}

body::after {
  width: 300px;
  height: 300px;
  background: #00b4d8;
  bottom: -80px;
  right: -80px;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -30px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
}

.login-card {
  background: #ffffff;
  padding: 45px 40px;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo-section {
  text-align: center;
  margin-bottom: 35px;
}

.logo-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #ff5a00 0%, #ff8533 100%);
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: white;
  margin-bottom: 15px;
  box-shadow: 0 8px 20px rgba(255, 90, 0, 0.3);
}

.title-text {
  font-weight: 700;
  color: #0a1d44;
  font-size: 26px;
  margin-bottom: 8px;
}

.subtitle-text {
  color: #6c757d;
  font-size: 14px;
  font-weight: 400;
}

.form-label {
  font-weight: 600;
  color: #2c3e50;
  font-size: 14px;
  margin-bottom: 8px;
}

.input-group {
  margin-bottom: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
}

.input-group:focus-within {
  border-color: #ff5a00;
  box-shadow: 0 0 0 4px rgba(255, 90, 0, 0.1);
}

.input-group-text {
  background: white;
  border: none;
  color: #6c757d;
  padding: 12px 15px;
}

.form-control {
  border: none;
  padding: 12px 15px;
  font-size: 15px;
  background: white;
}

.form-control:focus {
  box-shadow: none;
  background: white;
}

.password-toggle {
  cursor: pointer;
  transition: color 0.2s ease;
  user-select: none;
}

.password-toggle:hover {
  color: #ff5a00;
}

.btn-login {
  background: linear-gradient(135deg, #ff5a00 0%, #ff7733 100%);
  border: none;
  font-weight: 600;
  font-size: 16px;
  padding: 14px;
  border-radius: 10px;
  color: white;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-login::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s;
}

.btn-login:hover::before {
  left: 100%;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 90, 0, 0.4);
}

.btn-login:active {
  transform: translateY(0);
}

.btn-login:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.spinner-border-sm {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

.forgot-password {
  text-align: right;
  margin-top: 12px;
}

.forgot-password a {
  color: #ff5a00;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.forgot-password a:hover {
  color: #e65100;
  text-decoration: underline;
}

.error-feedback {
  color: #dc3545;
  font-size: 13px;
  margin-top: 6px;
  display: none;
  animation: shake 0.3s;
}

.error-feedback.show {
  display: block;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

.input-group.error {
  border-color: #dc3545;
}

/* Toast improvements */
.toast {
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.toast.text-bg-success {
  background-color: #28a745 !important;
}

/* Responsive */
@media (max-width: 480px) {
  .login-card {
    padding: 35px 25px;
  }

  .title-text {
    font-size: 22px;
  }

  .logo-icon {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }
}
