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

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

.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

.bmda-login-body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  background:
    linear-gradient(135deg, rgba(14, 32, 87, 0.82) 0%, rgba(27, 56, 132, 0.78) 38%, rgba(41, 71, 148, 0.74) 72%, rgba(58, 91, 171, 0.72) 100%),
    radial-gradient(circle at 18% 22%, rgba(120, 188, 255, 0.35), transparent 42%),
    radial-gradient(circle at 86% 80%, rgba(118, 160, 255, 0.3), transparent 44%),
    var(--bmda-bg-image, none);
  background-size: cover, auto, auto, cover;
  background-position: center, center, center, center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: #e5e7eb;
}

.bmda-login-shell {
  width: 100%;
  min-height: 100vh;
  position: relative;
}

.bmda-auth-stage {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem 1rem;
}

.bmda-card {
  width: min(100%, 540px);
  background: rgba(255, 255, 255, 0.22);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  box-shadow: 0 30px 70px rgba(2, 8, 23, 0.42);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 2rem 1.9rem;
}

.bmda-card-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 0.65rem;
}

.bmda-card-logo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.16);
  padding: 2px;
}

.bmda-card-header {
  text-align: center;
  margin-bottom: 1rem;
}

.bmda-card-header h1,
.bmda-card-header h2 {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 700;
  color: #ffffff;
}

.bmda-card-header p {
  margin: 0.35rem 0 0;
  color: #dbe4ff;
  font-size: 0.92rem;
}

.bmda-alert {
  margin: 0 0 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(15, 23, 42, 0.36);
  color: #e2e8f0;
  padding: 0.58rem 0.72rem;
  font-size: 0.8rem;
  border-radius: 10px;
}

.bmda-form {
  display: flex;
  flex-direction: column;
  gap: 0.72rem;
}

.bmda-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.34rem;
}

.bmda-form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #f8fafc;
}

.bmda-form-group input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 12px;
  padding: 0.78rem 0.92rem;
  font-size: 0.95rem;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.bmda-form-group input::placeholder {
  color: #cfd8eb;
}

.bmda-form-group input:focus {
  border-color: rgba(96, 165, 250, 0.9);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
  background: rgba(255, 255, 255, 0.14);
}

.bmda-password-wrap {
  position: relative;
}

.bmda-password-wrap input {
  padding-right: 2.2rem;
}

.bmda-password-toggle {
  position: absolute;
  right: 0.58rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #dbeafe;
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
  padding: 0;
}

.bmda-password-toggle svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bmda-form-meta {
  margin-top: 0.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.bmda-remember {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.86rem;
  color: #dbe4ff;
  user-select: none;
}

.bmda-remember input {
  margin: 0;
}

.bmda-link-btn {
  border: 0;
  background: transparent;
  color: #93c5fd;
  font-size: 0.84rem;
  padding: 0;
  cursor: pointer;
}

.bmda-link-btn:hover {
  color: #bfdbfe;
  text-decoration: underline;
}

.bmda-primary-btn,
.bmda-secondary-btn {
  border-radius: 10px;
  font-size: 0.96rem;
  font-weight: 600;
  padding: 0.78rem 0.92rem;
  cursor: pointer;
}

.bmda-primary-btn {
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
  background: #000000;
  margin-top: 0.1rem;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.5);
  transition: transform 0.16s ease, filter 0.16s ease;
}

.bmda-primary-btn:hover {
  background: #111111;
  filter: none;
  transform: translateY(-1px);
}

.bmda-secondary-btn {
  border: 1px solid rgba(255, 255, 255, 0.34);
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.12);
}

.bmda-footer-copy {
  text-align: center;
  margin: 1rem 0 0;
  color: #eef4ff;
  font-size: 0.9rem;
}

.bmda-footer-copy .bmda-link-btn {
  color: #ffffff;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.7);
  text-underline-offset: 2px;
}

.bmda-footer-copy .bmda-link-btn:hover {
  color: #dbeafe;
  text-decoration-color: rgba(219, 234, 254, 0.95);
}

.bmda-reset-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.62rem;
  margin-top: 0.2rem;
}

.hidden {
  display: none;
}

@media (max-width: 1024px) {
  .bmda-login-shell {
    min-height: 100vh;
  }
}

@media (max-width: 640px) {
  .bmda-login-body {
    padding: 1rem;
  }

  .bmda-login-shell,
  .bmda-auth-stage {
    min-height: 100vh;
  }

  .bmda-card {
    padding: 1.4rem 1.2rem;
  }
}
