/* Devise Login Page Styles */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Open Sans", sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-container {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  padding: 48px;
  width: 100%;
  max-width: 600px;
  position: relative;
  overflow: hidden;
}

.login-header {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.login-logo {
  width: 150px;
  height: 60px;
  margin-bottom: 24px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.login-logo .logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.login-title {
  font-size: 28px;
  font-weight: 700;
  color: #1F2937;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #1F2937, #374151);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 1;
}

.login-subtitle {
  font-size: 16px;
  color: #6B7280;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.form-container {
  margin-bottom: 32px;
}

.field {
  margin-bottom: 24px;
}

.field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.field input[type="email"],
.field input[type="password"] {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #E5E7EB;
  border-radius: 12px;
  font-size: 16px;
  background: white;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.field input[type="email"]:focus,
.field input[type="password"]:focus {
  border-color: #216fb7;
  outline: none;
  box-shadow: 0 0 0 4px rgba(33, 111, 183, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1);
}

.field input[type="email"]::placeholder,
.field input[type="password"]::placeholder {
  color: #9CA3AF;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.remember-me input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid #D1D5DB;
  cursor: pointer;
  accent-color: #216fb7;
}

.remember-me label {
  font-size: 14px;
  color: #6B7280;
  cursor: pointer;
  margin: 0;
}

.actions {
  margin-bottom: 24px;
}

.btn-login {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, #216fb7, #1D4ED8);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(33, 111, 183, 0.3);
}

.btn-login::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 ease;
}

.btn-login:hover {
  background: linear-gradient(135deg, #1D4ED8, #1E40AF);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(33, 111, 183, 0.4);
}

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

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

.links-section {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid #F3F4F6;
}

.links-section a {
  color: #216fb7;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-block;
  margin: 0 8px;
}

.links-section a:hover {
  color: #1D4ED8;
  text-decoration: underline;
}

.error-messages {
  background: linear-gradient(135deg, #FEF2F2, #FEE2E2);
  border: 1px solid #FECACA;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
  color: #DC2626;
  font-size: 14px;
}

.error-messages ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.error-messages li {
  margin-bottom: 4px;
}

.error-messages li:last-child {
  margin-bottom: 0;
}

.notice-messages {
  background: linear-gradient(135deg, #F0FDF4, #DCFCE7);
  border: 1px solid #BBF7D0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
  color: #16A34A;
  font-size: 14px;
}

.alert-messages {
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  border: 1px solid #FCD34D;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
  color: #D97706;
  font-size: 14px;
}

/* Loading state */
.btn-login.loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn-login.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .login-container {
    padding: 32px 24px;
    margin: 20px;
    max-width: 100%;
  }
  
  .login-title {
    font-size: 24px;
  }
  
  .login-subtitle {
    font-size: 14px;
  }
  
  .field input[type="email"],
  .field input[type="password"] {
    padding: 14px 16px;
    font-size: 16px;
  }
  
  .btn-login {
    padding: 14px 20px;
    font-size: 16px;
  }
  
  .login-logo {
    width: 120px;
    height: 48px;
  }
}

@media (max-width: 480px) {
  .login-container {
    padding: 24px 20px;
    margin: 16px;
  }
  
  .login-logo {
    width: 100px;
    height: 40px;
  }
}

/* Animation for form appearance */
.login-container {
  animation: slideUp 0.6s ease-out;
}

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

/* Focus animations */
.field input[type="email"]:focus,
.field input[type="password"]:focus {
  transform: scale(1.02);
}

/* Hover effects for links */
.links-section a {
  position: relative;
}

.links-section a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #216fb7;
  transition: width 0.3s ease;
}

.links-section a:hover::after {
  width: 100%;
}
