/* JIRA: ENG-XXXX — Brand Dispatch third-party login (scoped; do not alter login.css) */
@keyframes bd-login-rise {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes bd-gradient-drift {
  0% { background-position: 0% 40%; }
  50% { background-position: 100% 60%; }
  100% { background-position: 0% 40%; }
}

@keyframes bd-orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(12px, -18px) scale(1.06); }
}

@keyframes bd-orb-float-alt {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-16px, 14px) scale(1.08); }
}

@keyframes bd-mark-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(87, 193, 179, 0.35); }
  50% { transform: scale(1.04); box-shadow: 0 0 0 14px rgba(87, 193, 179, 0); }
}

@keyframes bd-shimmer {
  0% { background-position: -140% 0; }
  100% { background-position: 200% 0; }
}

@keyframes bd-error-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

@keyframes bd-spin {
  to { transform: rotate(360deg); }
}

html, body.bd-login-body {
  height: 100%;
  margin: 0;
}

body.bd-login-body {
  min-height: 100%;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: #e8eef7;
  background:
    radial-gradient(ellipse 80% 60% at 20% 20%, rgba(87, 193, 179, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 75%, rgba(91, 75, 138, 0.35) 0%, transparent 50%),
    linear-gradient(135deg, #0f1724 0%, #1a2740 42%, #243352 100%);
  background-size: 140% 140%;
  animation: bd-gradient-drift 18s ease-in-out infinite;
  position: relative;
  overflow-x: hidden;
}

.bd-login-body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
}

.bd-login-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
  z-index: 0;
}

.bd-login-orb-a {
  width: 280px;
  height: 280px;
  top: -60px;
  left: -40px;
  background: radial-gradient(circle, rgba(87, 193, 179, 0.35) 0%, transparent 70%);
  animation: bd-orb-float 9s ease-in-out infinite;
}

.bd-login-orb-b {
  width: 340px;
  height: 340px;
  bottom: -80px;
  right: -60px;
  background: radial-gradient(circle, rgba(136, 106, 181, 0.4) 0%, transparent 70%);
  animation: bd-orb-float-alt 11s ease-in-out infinite;
}

.bd-login-orb-c {
  width: 160px;
  height: 160px;
  top: 40%;
  right: 18%;
  background: radial-gradient(circle, rgba(87, 193, 179, 0.2) 0%, transparent 70%);
  animation: bd-orb-float 13s ease-in-out infinite reverse;
}

.bd-login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
}

.bd-login-card {
  width: 100%;
  max-width: 420px;
  padding: 36px 32px 28px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(18, 28, 46, 0.72);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: bd-login-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.bd-login-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 18px;
  font-size: 26px;
  color: #57c1b3;
  background: linear-gradient(145deg, rgba(91, 75, 138, 0.55) 0%, rgba(87, 193, 179, 0.28) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  animation: bd-mark-pulse 2.4s ease-in-out infinite;
}

.bd-login-title {
  margin: 0 0 6px;
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f5f7fb;
}

.bd-login-lead {
  margin: 0 0 24px;
  text-align: center;
  font-size: 13.5px;
  line-height: 1.45;
  color: rgba(232, 238, 247, 0.72);
}

.bd-login-error {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: rgba(127, 29, 29, 0.45);
  color: #fecaca;
  font-size: 13px;
  animation: bd-error-shake 0.45s ease;
}

.bd-login-field {
  margin-bottom: 16px;
}

.bd-login-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(232, 238, 247, 0.7);
}

.bd-login-input-shell {
  position: relative;
}

.bd-login-input-shell .bd-login-field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(87, 193, 179, 0.85);
  font-size: 14px;
  pointer-events: none;
}

.bd-login-input-shell input {
  width: 100%;
  height: 46px;
  padding: 10px 14px 10px 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 14, 26, 0.55);
  color: #f5f7fb;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-sizing: border-box;
}

.bd-login-input-shell input::placeholder {
  color: rgba(232, 238, 247, 0.35);
}

.bd-login-input-shell input:focus {
  border-color: rgba(87, 193, 179, 0.65);
  box-shadow: 0 0 0 3px rgba(87, 193, 179, 0.2);
  background: rgba(8, 14, 26, 0.75);
}

.bd-login-submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  margin-top: 8px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  color: #0f1724;
  cursor: pointer;
  overflow: hidden;
  background: linear-gradient(135deg, #57c1b3 0%, #7dd3c8 45%, #886ab5 100%);
  background-size: 200% 100%;
  box-shadow: 0 10px 28px rgba(87, 193, 179, 0.28);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.bd-login-submit::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 25%,
    rgba(255, 255, 255, 0.35) 45%,
    transparent 65%
  );
  background-size: 200% 100%;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.bd-login-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(87, 193, 179, 0.38);
}

.bd-login-submit:hover::after {
  opacity: 1;
  animation: bd-shimmer 1s ease;
}

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

.bd-login-submit.is-loading {
  pointer-events: none;
  opacity: 0.85;
}

.bd-login-submit .bd-login-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(15, 23, 36, 0.25);
  border-top-color: #0f1724;
  border-radius: 50%;
  animation: bd-spin 0.7s linear infinite;
}

.bd-login-submit.is-loading .bd-login-spinner {
  display: inline-block;
}

.bd-login-submit.is-loading .bd-login-submit-label {
  opacity: 0.85;
}

.bd-login-foot {
  margin: 20px 0 0;
  text-align: center;
  font-size: 12px;
  color: rgba(232, 238, 247, 0.45);
}

.bd-login-lead a {
  color: #7dd3c8;
  font-weight: 600;
  text-decoration: none;
}

.bd-login-lead a:hover,
.bd-login-lead a:focus {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .bd-login-card {
    padding: 28px 20px 22px;
    border-radius: 18px;
  }

  .bd-login-title {
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.bd-login-body,
  .bd-login-orb,
  .bd-login-mark,
  .bd-login-card,
  .bd-login-error,
  .bd-login-submit::after,
  .bd-login-spinner {
    animation: none !important;
  }
}
