@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");

:root {
  --blue-dark: #0d45b1;
  --green: #2db742;
  --orange: #fc8825;
  --gray: #6c757d;
  --light-gray: #f8f9fa;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--green) 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.02)"/><circle cx="75" cy="25" r="1" fill="rgba(255,255,255,0.02)"/><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.02)"/><circle cx="25" cy="75" r="1" fill="rgba(255,255,255,0.02)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.02)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  pointer-events: none;
}

.card-custom {
  border: none;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.95);
}

.login-visual {
  background: linear-gradient(
    135deg,
    rgba(13, 69, 177, 0.9) 0%,
    rgba(45, 183, 66, 0.9) 100%
  );
  position: relative;
  overflow: hidden;
}

.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
}

/* MGF Logo Styles */
.mgf-logo {
  margin: 0 auto 2rem;
}

.logo-image {
  width: 290px;
  height: auto;
  object-fit: contain;
  filter: contrast(1.2) saturate(1.1);
}

.brand-logo-container {
  margin: 0 auto;
}

.mobile-logo {
  height: 90px;
  width: 240px;
  object-fit: contain;
  margin-bottom: 1rem;
  border-radius: 6px;
}

/* Form Section */
.form-section {
  min-height: 500px;
  background: white;
}

.input-group-custom {
  position: relative;
}

.form-control {
  border: 1px solid #000000;
  border-radius: 10px;
  padding: 1rem 1rem 1rem 3.5rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
  height: 60px;
}

.form-control:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 0.25rem rgba(252, 136, 37, 0.15);
  background: white;
  outline: none;
}

.form-control::placeholder {
  color: var(--gray);
  opacity: 0.8;
}

.input-icon {
  position: absolute;
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray);
  z-index: 10;
}

.toggle-password {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--gray);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 5px;
  transition: all 0.3s ease;
  z-index: 10;
}

.toggle-password:hover {
  color: var(--orange);
  background: rgba(252, 136, 37, 0.1);
}

.btn-login {
  background: linear-gradient(135deg, var(--orange) 0%, #e07a20 100%);
  border: none;
  border-radius: 15px;
  padding: 1rem 2rem;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(252, 136, 37, 0.3);
  height: 60px;
}

.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::before {
  left: 100%;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(252, 136, 37, 0.4);
}

.btn-login:disabled {
  background: #6c757d;
  transform: none;
  box-shadow: none;
  cursor: not-allowed;
}

.btn-login:disabled::before {
  display: none;
}

.alert {
  border-radius: 15px;
  border: none;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
}

.alert-success {
  background: rgba(45, 183, 66, 0.1);
  color: var(--green);
  border-left: 4px solid var(--green);
}

.alert-danger {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  border-left: 4px solid #dc3545;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .card-custom {
    margin: 1rem;
  }

  .form-section {
    min-height: auto;
    padding: 2rem 0;
  }

  .mobile-logo {
    height: 90px;
    width: 250px;
  }
}

@media (max-width: 768px) {
  .mobile-logo {
    height: 90px;
    width: 240px;
  }

  .form-control {
    height: 55px;
  }

  .btn-login {
    height: 55px;
  }
}

@media (max-width: 576px) {
  .form-control {
    padding: 0.9rem 0.9rem 0.9rem 3rem;
    height: 50px;
  }

  .input-icon {
    left: 1rem;
  }

  .mobile-logo {
    height: 80px;
    width: 250px;
  }

  .btn-login {
    height: 50px;
    font-size: 1rem;
  }
}

@media (max-width: 320px) {
  .mobile-logo {
    height: 80px;
    width: 210px;
  }
}