/* JIRA: ENG-XXXX — Brand Portal login (LYB structure; light portal theme) */
:root {
  --bp-bg: #f6f3ee;
  --bp-bg-elevated: #fffcf8;
  --bp-ink: #1c1917;
  --bp-ink-soft: #57534e;
  --bp-line: rgba(28, 25, 23, 0.1);
  --bp-accent: #0f766e;
  --bp-accent-deep: #115e59;
  --bp-accent-soft: #ccfbf1;
  --bp-warn: #b45309;
  --bp-danger: #b91c1c;
  --bp-shadow: 0 28px 80px rgba(28, 25, 23, 0.12);
  --bp-radius: 22px;
  --bp-font: "Source Sans 3", "Segoe UI", sans-serif;
  --bp-display: "Fraunces", Georgia, serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

.d-lg-none { display: none; }

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

body.bp-login-body {
  font-family: var(--bp-font);
  color: var(--bp-ink);
  background: var(--bp-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.bp-login {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
}

/* —— Full-bleed light ambient (no outer box) —— */
.bp-login-ambient {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 12% 18%, rgba(15, 118, 110, 0.2), transparent 55%),
    radial-gradient(ellipse 70% 50% at 88% 78%, rgba(180, 83, 9, 0.14), transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(20, 184, 166, 0.1), transparent 55%),
    linear-gradient(155deg, #f9f5f0 0%, #efe8df 42%, #e8f5f1 100%);
}

.bp-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.5;
  animation: bp-orb-float 14s ease-in-out infinite;
  will-change: transform;
}

.bp-orb-a {
  width: 360px;
  height: 360px;
  background: #99f6e4;
  top: -90px;
  left: -70px;
}

.bp-orb-b {
  width: 300px;
  height: 300px;
  background: #fed7aa;
  bottom: 6%;
  right: 6%;
  animation-delay: -4s;
}

.bp-orb-c {
  width: 220px;
  height: 220px;
  background: #5eead4;
  top: 42%;
  left: 40%;
  opacity: 0.28;
  animation-delay: -8s;
}

@keyframes bp-orb-float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(22px, -28px, 0) scale(1.07); }
}

.bp-mesh {
  position: absolute;
  inset: -8%;
  background:
    radial-gradient(ellipse 40% 30% at 22% 28%, rgba(15, 118, 110, 0.08), transparent),
    radial-gradient(ellipse 35% 28% at 76% 58%, rgba(180, 83, 9, 0.07), transparent);
  animation: bp-mesh-drift 22s ease-in-out infinite alternate;
}

@keyframes bp-mesh-drift {
  from { transform: translate3d(-1%, 0, 0) scale(1); }
  to { transform: translate3d(1.2%, -1%, 0) scale(1.03); }
}

.bp-grid-glow {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(28, 25, 23, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 25, 23, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  animation: bp-grid-drift 28s linear infinite;
  opacity: 0.7;
}

@keyframes bp-grid-drift {
  from { transform: translateY(0); }
  to { transform: translateY(56px); }
}

/* —— Shell: two separate panels with gap —— */
.bp-login-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: 100vh;
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0;
  gap: 1.25rem;
  align-items: stretch;
}

/* —— Left brand panel (light glass) —— */
.bp-login-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.5rem 2.75rem;
  border-radius: calc(var(--bp-radius) + 6px);
  color: var(--bp-ink);
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(255, 252, 248, 0.92), rgba(255, 252, 248, 0.72)),
    linear-gradient(180deg, rgba(204, 251, 241, 0.35), rgba(254, 215, 170, 0.12));
  border: 1px solid rgba(28, 25, 23, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    var(--bp-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  opacity: 0;
  transform: translateX(-28px);
  animation: bp-slide-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

.bp-brand-inner {
  position: relative;
  z-index: 1;
}

.bp-brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.bp-mark-core {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  flex-shrink: 0;
  background:
    linear-gradient(145deg, #2dd4bf 0%, var(--bp-accent) 48%, var(--bp-accent-deep) 100%);
  box-shadow:
    0 10px 28px rgba(15, 118, 110, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  position: relative;
  animation: bp-mark-float 4.5s ease-in-out infinite;
}

.bp-mark-core::after {
  content: "";
  position: absolute;
  inset: 11px;
  border-radius: 50%;
  background: rgba(255, 252, 248, 0.92);
  box-shadow: 0 1px 2px rgba(15, 118, 110, 0.15);
}

.bp-mark-core-sm {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  animation: none;
}

.bp-mark-core-sm::after {
  inset: 10px;
}

@keyframes bp-mark-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.04); }
}

.bp-brand-wordmark {
  font-family: var(--bp-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--bp-ink);
}

.bp-brand-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  border: 1px solid rgba(15, 118, 110, 0.14);
  color: var(--bp-accent-deep);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bp-brand-eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #14b8a6;
  box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.55);
  animation: bp-live-ping 1.8s ease-out infinite;
}

@keyframes bp-live-ping {
  0% { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(20, 184, 166, 0); }
  100% { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0); }
}

.bp-brand-title {
  font-family: var(--bp-display);
  font-size: clamp(2.2rem, 4vw, 3.25rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  max-width: 12ch;
  color: var(--bp-ink);
}

.bp-brand-title-accent {
  display: inline-block;
  background: linear-gradient(120deg, var(--bp-accent) 0%, #14b8a6 40%, var(--bp-warn) 70%, var(--bp-accent) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: bp-shimmer-text 4s linear infinite;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

.bp-brand-title-accent.is-out {
  opacity: 0;
  transform: translateY(8px);
}

.bp-brand-title-accent.is-in {
  animation: bp-shimmer-text 4s linear infinite, bp-word-in 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes bp-shimmer-text {
  to { background-position: 200% center; }
}

@keyframes bp-word-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.bp-brand-subtitle {
  margin: 0;
  max-width: 36ch;
  color: var(--bp-ink-soft);
  font-size: 1.05rem;
  line-height: 1.6;
}

.bp-brand-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 2.75rem;
}

.bp-stat {
  padding: 1rem 0.85rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(28, 25, 23, 0.07);
  backdrop-filter: blur(8px);
  transition: transform 0.35s ease, background 0.35s ease, box-shadow 0.35s ease;
}

.bp-stat:hover {
  transform: translateY(-4px);
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.1);
}

.bp-stat-value {
  display: block;
  font-family: var(--bp-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--bp-accent-deep);
  letter-spacing: -0.02em;
}

.bp-stat-label {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--bp-ink-soft);
  font-weight: 500;
}

.bp-brand-footer {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 2rem;
  color: var(--bp-ink-soft);
  font-size: 0.8125rem;
  font-weight: 500;
}

.bp-brand-footer-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(28, 25, 23, 0.25);
}

/* —— Right form column —— */
.bp-login-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  opacity: 0;
  transform: translateX(28px);
  animation: bp-slide-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.22s forwards;
}

@keyframes bp-slide-in {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.bp-login-card {
  position: relative;
  width: min(100%, 460px);
  padding: 2.35rem 2.25rem 1.75rem;
  border-radius: var(--bp-radius);
  background: linear-gradient(180deg, var(--bp-bg-elevated), #fff);
  border: 1px solid rgba(28, 25, 23, 0.08);
  box-shadow: var(--bp-shadow);
  overflow: hidden;
}

.bp-card-shine {
  position: absolute;
  inset: -40% auto auto -30%;
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, rgba(15, 118, 110, 0.12), transparent 65%);
  pointer-events: none;
}

.bp-card-header {
  margin-bottom: 1.75rem;
}

.bp-card-logo {
  margin-bottom: 1rem;
}

.bp-card-title {
  margin: 0 0 0.4rem;
  font-family: var(--bp-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--bp-ink);
}

.bp-card-subtitle {
  margin: 0;
  color: var(--bp-ink-soft);
  font-size: 0.95rem;
}

.bp-login-error {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  background: #fef2f2;
  color: var(--bp-danger);
  border: 1px solid #fecaca;
  animation: bp-shake 0.45s ease;
}

@keyframes bp-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.bp-login-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.bp-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.bp-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
}

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

.bp-input-icon {
  position: absolute;
  left: 14px;
  color: #9ca3af;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 1;
}

.bp-input {
  appearance: none;
  width: 100%;
  border: 1px solid var(--bp-line);
  background: #fff;
  border-radius: 12px;
  padding: 14px 44px 14px 42px;
  font: inherit;
  font-size: 16px;
  color: var(--bp-ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.bp-input::placeholder {
  color: #a8a29e;
}

.bp-input:focus {
  outline: none;
  border-color: var(--bp-accent);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.15);
  transform: translateY(-1px);
}

.bp-input-wrap:focus-within .bp-input-icon {
  color: var(--bp-accent);
}

/* Hide browser native password reveal so only our toggle shows */
.bp-input[type="password"]::-ms-reveal,
.bp-input[type="password"]::-ms-clear {
  display: none;
}

.bp-password-toggle {
  position: absolute;
  right: 8px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
  z-index: 2;
}

.bp-password-toggle svg {
  grid-area: 1 / 1;
}

.bp-password-toggle .bp-eye-closed {
  display: none;
}

.bp-password-toggle.is-visible .bp-eye-open {
  display: none;
}

.bp-password-toggle.is-visible .bp-eye-closed {
  display: block;
}

.bp-password-toggle:hover {
  color: var(--bp-accent-deep);
  background: rgba(15, 118, 110, 0.08);
}

.bp-login-submit {
  margin-top: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 15px 18px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #14b8a6 0%, var(--bp-accent-deep) 100%);
  box-shadow: 0 14px 32px rgba(15, 118, 110, 0.28);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.bp-login-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(15, 118, 110, 0.34);
}

.bp-login-submit:active:not(:disabled) {
  transform: translateY(0);
}

.bp-login-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  filter: grayscale(0.15);
}

.bp-login-submit svg {
  transition: transform 0.25s ease;
}

.bp-login-submit:hover:not(:disabled) svg {
  transform: translateX(3px);
}

.bp-card-footnote {
  margin: 1.35rem 0 0;
  text-align: center;
  font-size: 0.75rem;
  color: #9ca3af;
}

@media (prefers-reduced-motion: reduce) {
  .bp-orb,
  .bp-mesh,
  .bp-grid-glow,
  .bp-mark-core,
  .bp-login-brand,
  .bp-login-main,
  .bp-brand-title-accent,
  .bp-brand-eyebrow::before {
    animation: none !important;
  }
  .bp-login-brand,
  .bp-login-main {
    opacity: 1;
    transform: none;
  }
  .bp-brand-title-accent.is-out,
  .bp-brand-title-accent.is-in {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 900px) {
  .bp-login-shell {
    grid-template-columns: 1fr;
    width: min(560px, calc(100% - 1.5rem));
    padding: 1rem 0 1.5rem;
    gap: 1rem;
    min-height: auto;
  }

  .bp-login-brand {
    padding: 1.75rem 1.5rem 1.35rem;
    min-height: auto;
  }

  .bp-brand-mark {
    margin-bottom: 1.5rem;
  }

  .bp-brand-title {
    max-width: none;
    font-size: clamp(1.85rem, 7vw, 2.4rem);
  }

  .bp-brand-stats {
    margin-top: 1.5rem;
  }

  .bp-brand-footer {
    margin-top: 1.25rem;
  }

  .d-lg-none {
    display: block;
  }

  .bp-login-card {
    padding: 1.75rem 1.35rem 1.4rem;
  }
}

@media (max-width: 480px) {
  .bp-brand-stats {
    grid-template-columns: 1fr;
  }

  .bp-login-shell {
    width: calc(100% - 1rem);
  }
}
