/* Login Page Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  overflow-x: hidden;
  overflow-y: auto !important;
  height: auto !important;
  min-height: 100vh;
}

#page-top {
  overflow: hidden;
}

.sso-container {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.sso-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(133deg, #2d3748, #42526e);
  z-index: 0;
  overflow: hidden;
}

.sso-background::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent);
  border-radius: 50%;
  top: -300px;
  right: -300px;
  animation: float 12s ease-in-out infinite, pulse 4s ease-in-out infinite;
}

.sso-background::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent);
  border-radius: 50%;
  bottom: -250px;
  left: -250px;
  animation: float 15s ease-in-out infinite reverse, pulse 5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(30px, -30px) rotate(90deg); }
  50% { transform: translate(60px, 30px) rotate(180deg); }
  75% { transform: translate(-30px, 60px) rotate(270deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 70%);
  filter: blur(60px);
}

.orb-1 {
  width: 300px;
  height: 300px;
  bottom: -150px;
  left: 10%;
  animation: bubbleRise1 20s ease-in-out infinite;
}

.orb-2 {
  width: 250px;
  height: 250px;
  bottom: -125px;
  left: 60%;
  animation: bubbleRise2 18s ease-in-out infinite 3s;
}

.orb-3 {
  width: 200px;
  height: 200px;
  bottom: -100px;
  left: 35%;
  animation: bubbleRise3 22s ease-in-out infinite 6s;
}

@keyframes bubbleRise1 {
  0% { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { transform: translateY(-120vh) translateX(30px) scale(1.2); opacity: 0; }
}

@keyframes bubbleRise2 {
  0% { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
  10% { opacity: 0.5; }
  90% { opacity: 0.5; }
  100% { transform: translateY(-120vh) translateX(-40px) scale(1.3); opacity: 0; }
}

@keyframes bubbleRise3 {
  0% { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
  10% { opacity: 0.4; }
  90% { opacity: 0.4; }
  100% { transform: translateY(-120vh) translateX(20px) scale(1.1); opacity: 0; }
}

.sso-content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 480px;
  padding: 20px;
}

.sso-card {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 48px 40px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.3), 0 0 1px rgba(255, 255, 255, 0.3) inset;
  animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.sso-header {
  text-align: center;
  margin-bottom: 40px;
}

.sso-logo-container {
  position: relative;
  max-width: 150px;
  max-height: 100px;
  margin: 0 auto 24px;
}

.sso-logo-icon {
  font-size: 64px;
  background: linear-gradient(133deg, #2d3748, #42526e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: iconPulse 3s ease-in-out infinite;
}

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

.sso-title {
  font-size: 28px;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.sso-subtitle {
  font-size: 14px;
  color: #718096;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-floating-group {
  position: relative;
  margin-bottom: 28px;
}

.form-floating-input {
  width: 100%;
  padding: 20px 20px 20px 52px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 15px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #f8fafc;
  color: #1a202c;
}

.form-floating-input:focus {
  outline: none;
  border-color: #42526e;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(66, 82, 110, 0.1);
}

.form-floating-input:focus + .form-floating-label,
.form-floating-input:not(:placeholder-shown) + .form-floating-label {
  top: -10px;
  left: 12px;
  font-size: 12px;
  color: #42526e;
  padding: 0 8px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
}

.form-floating-input:focus + .form-floating-label {
  border-color: #42526e;
}

.form-floating-label {
  position: absolute;
  top: 20px;
  left: 52px;
  color: #a0aec0;
  font-size: 15px;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
}

.form-floating-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #a0aec0;
  font-size: 18px;
  transition: color 0.3s;
}

.form-floating-input:focus ~ .form-floating-icon {
  color: #42526e;
}

.password-toggle {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #a0aec0;
  font-size: 18px;
  transition: color 0.3s;
}

.password-toggle:hover {
  color: #42526e;
}

.sso-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.sso-checkbox {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.sso-checkbox input {
  display: none;
}

.sso-checkbox .checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid #cbd5e0;
  border-radius: 4px;
  margin-right: 10px;
  position: relative;
  transition: all 0.3s;
  flex-shrink: 0;
}

.sso-checkbox input:checked ~ .checkmark {
  background: linear-gradient(133deg, #2d3748, #42526e);
  border-color: #2d3748;
}

.sso-checkbox input:checked ~ .checkmark::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-label {
  font-size: 14px;
  color: #4a5568;
  font-weight: 500;
}

.sso-link {
  font-size: 14px;
  color: #42526e;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.sso-link:hover {
  color: #2d3748;
}

.sso-btn-primary {
  width: 100%;
  padding: 18px;
  background: linear-gradient(133deg, #2d3748, #42526e);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 24px rgba(45, 55, 72, 0.3);
  position: relative;
  overflow: hidden;
}

.sso-btn-primary::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;
}

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

.sso-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(45, 55, 72, 0.4);
}

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

.btn-icon {
  transition: transform 0.3s;
}

.sso-btn-primary:hover .btn-icon {
  transform: translateX(4px);
}

.sso-footer {
  margin-top: 40px;
}

.sso-divider {
  text-align: center;
  position: relative;
  margin-bottom: 24px;
}

.sso-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
}

.sso-divider span {
  background: rgba(255, 255, 255, 0.98);
  padding: 0 16px;
  font-size: 12px;
  color: #a0aec0;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
}

.sso-security-badges {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.security-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(135deg, #f7fafc, #edf2f7);
  border-radius: 20px;
  font-size: 11px;
  color: #4a5568;
  font-weight: 600;
  border: 1px solid #e2e8f0;
}

.security-badge i {
  color: #42526e;
  font-size: 12px;
}

.sso-modal {
  border-radius: 20px;
  border: none;
  overflow: hidden;
}

.sso-modal .modal-header {
  background: linear-gradient(133deg, #2d3748, #42526e);
  color: white;
  border: none;
  padding: 20px 24px;
}

.sso-modal .modal-title {
  font-weight: 600;
  font-size: 18px;
  color: white;
}

.sso-modal .modal-title i {
  margin-right: 8px;
}

.sso-modal .close {
  color: white;
  opacity: 0.8;
  text-shadow: none;
  font-size: 28px;
}

.sso-modal .close:hover {
  opacity: 1;
}

.sso-modal .modal-footer {
  border: none;
  padding: 20px 24px;
  justify-content: center;
}

.btn-modal-close {
  background: linear-gradient(133deg, #2d3748, #42526e);
  color: white;
  border: none;
  padding: 12px 32px;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-modal-close:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(45, 55, 72, 0.3);
  color: white;
}

.sso-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(45, 55, 72, 0.95);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loader-content {
  position: relative;
  width: 120px;
  height: 120px;
}

.loader-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid transparent;
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.loader-ring:nth-child(2) {
  width: 80%;
  height: 80%;
  top: 10%;
  left: 10%;
  border-top-color: rgba(255, 255, 255, 0.7);
  animation-delay: 0.2s;
}

.loader-ring:nth-child(3) {
  width: 60%;
  height: 60%;
  top: 20%;
  left: 20%;
  border-top-color: rgba(255, 255, 255, 0.4);
  animation-delay: 0.4s;
}

.loader-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 32px;
  color: #fff;
  animation: pulse 1.5s ease-in-out infinite;
}

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

@media (max-width: 768px) {
  .sso-card {
    padding: 36px 28px;
  }

  .sso-title {
    font-size: 24px;
  }

  .sso-content {
    max-width: 100%;
  }

  .security-badge {
    font-size: 10px;
    padding: 6px 10px;
  }
}
