/* html,
body {
  height: 100%;
}
body {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: center;
  align-items: center;
  padding-top: 40px;
  padding-bottom: 40px;
  background-color: #f5f5f5;
}
.form-signin {
  width: 100%;
  max-width: 330px;
  padding: 15px;
  margin: auto;
}
.form-signin .checkbox {
  font-weight: 400;
}
.form-signin .form-control {
  position: relative;
  box-sizing: border-box;
  height: auto;
  padding: 10px;
  font-size: 16px;
  margin-top:5px;
}
.form-signin .form-control:focus {
  z-index: 2;
}
.form-signin input[type="email"] {
  margin-bottom: -1px;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}
.form-signin input[type="password"] {
  margin-bottom: 10px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
.bd-placeholder-img {
  font-size: 1.125rem;
  text-anchor: middle;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
@media (min-width: 768px) {
  .bd-placeholder-img-lg {
    font-size: 3.5rem;
  }
} */


/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 50%, #2d1b69 100%);
  color: #e2e8f0;
  min-height: 100vh;
  line-height: 1.6;
}

.container {
  min-height: 100vh;
  display: flex;
  flex-direction: column; /* Changed to column */
  align-items: center;
  justify-content: center;
  padding: 15px; /* Reduced from 20px */
  position: relative; /* Added for alert positioning */
}

.registration-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1200px;
  width: 100%;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  max-height: 95vh; /* Ensure it fits in viewport */
}

.brand-section {
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.image-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.brand-image {
  max-width: 90%;
  max-height: 90%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  background: #d3c7f1;
}

/* Form Section - Back to center alignment */
.form-section {
  padding: 35px 30px; /* Slightly increased back */
  display: flex;
  align-items: center; /* Back to center */
  justify-content: center;
}

.form-container {
  width: 100%;
  max-width: 400px;
}

.form-title {
  font-size: 2rem; /* Reduced from 2.25rem */
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 6px; /* Reduced from 8px */
  text-align: center;
}

.form-subtitle {
  color: #94a3b8;
  text-align: center;
  margin-bottom: 24px; /* Reduced from 32px */
  font-size: 1rem;
}

.registration-form {
  display: flex;
  flex-direction: column;
  gap: 16px; /* Restored normal spacing */
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px; /* Restored normal spacing */
}

.form-group label {
  font-weight: 500;
  color: #f1f5f9;
  font-size: 0.85rem; /* Slightly reduced from 0.9rem */
  margin-left: 4px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper i {
  position: absolute;
  left: 16px;
  color: #64748b;
  font-size: 1rem;
  z-index: 2;
}

.input-wrapper input {
  width: 100%;
  height: 40px;
  padding: 12px 16px 12px 48px; /* Reduced vertical padding from 16px to 12px */
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(71, 85, 105, 0.3);
  border-radius: 12px;
  color: #f8fafc;
  font-size: 0.95rem; /* Slightly reduced from 1rem */
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.input-wrapper input::placeholder {
  color: #64748b;
}

.input-wrapper input:focus {
  outline: none;
  border-color: #8B5CF6;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
  background: rgba(30, 41, 59, 0.8);
}

.input-wrapper input:focus + i {
  color: #8B5CF6;
}

.submit-btn {
  background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
  color: white;
  border: none;
  padding: 14px 24px; /* Reduced vertical padding from 16px to 14px */
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px; /* Reduced from 8px */
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
  background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%);
}

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

.form-footer {
  text-align: center;
  margin-top: 20px; /* Reduced from 24px */
  padding-top: 20px; /* Reduced from 24px */
  border-top: 1px solid rgba(71, 85, 105, 0.3);
}

.form-footer p {
  color: #94a3b8;
  font-size: 0.9rem;
}

.login-link {
  color: #8B5CF6;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.login-link:hover {
  color: #7C3AED;
  text-decoration: underline;
}

.page-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px; /* Reduced from 16px */
  text-align: center;
  color: #64748b;
  font-size: 0.75rem; /* Reduced from 0.8rem */
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(71, 85, 105, 0.2);
}

/* Alert styles - Part of document flow, pushes form down */
#alert {
  position: relative;
  top: 0;
  left: 0;
  transform: none;
  z-index: 1000;
  max-width: 500px;
  width: 90%;
  margin: 0 auto 20px auto; /* Center horizontally, add bottom margin */
  pointer-events: auto;
  order: -1; /* Ensure alert appears before the registration wrapper */
}

.alert {
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 0.95rem;
  display: block;
  margin-bottom: 0;
  border: 1px solid transparent;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(15px);
  pointer-events: auto; /* Re-enable clicks on actual alert */
  transform: scale(0.8);
  opacity: 0;
  animation: popIn 0.3s ease-out forwards;
  text-align: center;
}

.alert-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.alert-primary {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}

.alert-info {
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.3);
  color: #38bdf8;
}

.alert-dismissible {
  padding-right: 35px;
}

.alert .close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 18px;
  color: inherit;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.3s ease;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.alert .close:hover {
  opacity: 1;
}

.alert .close span {
  color: inherit;
}

/* Alert pop-in animation */
@keyframes popIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Animations */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .registration-wrapper {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 15px;
    max-height: 95vh;
  }
  
  .brand-section {
    padding: 15px;
    min-height: 150px;
  }
  
  .brand-image {
    max-width: 100%;
    max-height: 120px;
  }
  
  .form-section {
    padding: 30px 25px;
  }
  
  .form-title {
    font-size: 1.6rem;
  }
  
  .page-footer {
    position: relative;
    margin-top: 15px;
  }

  /* Adjust alert position for mobile - keep centered */
  #alert {
    max-width: 450px;
    width: 85%;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 8px;
  }
  
  .brand-section {
    padding: 12px;
    min-height: 120px;
  }
  
  .brand-image {
    max-width: 100%;
    max-height: 100px;
  }
  
  .form-title {
    font-size: 1.4rem;
  }

  .form-section {
    padding: 25px 20px;
  }

  .registration-form {
    gap: 14px;
  }

  /* Mobile alert positioning - keep centered */
  #alert {
    max-width: 400px;
    width: 80%;
  }

  .alert {
    font-size: 0.85rem;
    padding: 10px 14px;
  }
}