@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

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

body {
  /* Soft, light background to make the card pop */
  background-color: #f4f7f9;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

/* Split Card Container */
.login-container {
  display: flex;
  width: 100%;
  max-width: 900px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 25px 50px rgba(11, 25, 48, 0.08);
  overflow: hidden;
  min-height: 550px;
  margin: auto;
  /* Fallback to prevent centering cut-off */
}

/* Left Side: Branding Panel */
.brand-panel {
  flex: 1;
  background-color: #0b1930;
  color: #ffffff;
  padding: 50px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Decorative background elements in the navy panel */
.brand-panel::before {
  content: "";
  position: absolute;
  top: -50px;
  left: -50px;
  width: 200px;
  height: 200px;
  background: rgba(251, 176, 59, 0.1);
  border-radius: 50%;
}

.brand-panel::after {
  content: "";
  position: absolute;
  bottom: -80px;
  right: -50px;
  width: 250px;
  height: 250px;
  background: rgba(251, 176, 59, 0.05);
  border-radius: 50%;
}

/* Logo Styling */
.brand-logo {
  width: 7rem;
  height: auto;
  margin-bottom: 25px;
  position: relative;
  z-index: 1;
}

.brand-panel h1 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 15px;
  color: #fbb03b;
  position: relative;
  z-index: 1;
  line-height: 1.1;
}

.brand-panel p {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.6;
  color: #d1d5db;
  position: relative;
  z-index: 1;
}

/* Right Side: Form Panel */
.form-panel {
  flex: 1.2;
  padding: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.form-header {
  margin-bottom: 30px;
}

.form-header h2 {
  color: #0b1930;
  font-size: 28px;
  font-weight: 600;
}

.form-header p {
  color: #777;
  font-size: 14px;
}

/* Tab Navigation */
.tabs {
  display: flex;
  background: #f0f3f5;
  border-radius: 10px;
  padding: 5px;
  margin-bottom: 30px;
}

.tab-btn {
  flex: 1;
  padding: 12px 0;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: #555;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn:hover {
  color: #0b1930;
}

.tab-btn.active {
  background: #ffffff;
  color: #0b1930;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Forms */
.tab-content {
  display: none;
  animation: slideUp 0.4s ease forwards;
}

.tab-content.active {
  display: block;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.input-group {
  margin-bottom: 22px;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #0b1930;
}

.input-group input {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid #e1e5eb;
  border-radius: 10px;
  font-size: 14px;
  color: #0b1930;
  background: #fcfcfc;
  transition: all 0.3s ease;
}

.input-group input:focus {
  outline: none;
  border-color: #fbb03b;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(251, 176, 59, 0.1);
}

.input-group input::placeholder {
  color: #adb5bd;
  font-weight: 300;
}

/* Submit Button */
.submit-btn {
  width: 100%;
  padding: 15px;
  background-color: #fbb03b;
  color: #0b1930;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.submit-btn:hover {
  background-color: #fca311;
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(251, 176, 59, 0.2);
}

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

/* Responsive Design */
@media (max-width: 768px) {
  body {
    padding: 20px 15px;
    /* FIX: Changing alignment allows the form to start at the top and scroll normally */
    align-items: flex-start;
  }

  .login-container {
    flex-direction: column;
    min-height: auto;
    border-radius: 15px;
    margin: 0 auto;
    /* Ensures it stays centered horizontally but allows vertical scroll */
  }

  .brand-panel {
    padding: 40px 25px;
    text-align: center;
    align-items: center;
  }

  .brand-logo {
    width: 5rem;
    margin-bottom: 15px;
  }

  .brand-panel h1 {
    font-size: 32px;
  }

  .brand-panel p {
    font-size: 14px;
  }

  .form-panel {
    padding: 30px 25px;
  }

  .form-header h2 {
    font-size: 24px;
  }

  .tab-btn {
    font-size: 13px;
    padding: 10px 0;
  }
}

/* Extra small devices (phones, 480px and down) */
@media (max-width: 480px) {
  .brand-panel h1 {
    font-size: 28px;
  }

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

.login-alert {
  display: none;
  padding: 12px;
  margin-bottom: 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

.login-alert.error {
  display: block;
  background-color: #fee2e2;
  color: #b91c1c;
  border: 1px solid #f87171;
}

.login-alert.success {
  display: block;
  background-color: #dcfce3;
  color: #15803d;
  border: 1px solid #4ade80;
}