:root {
  --ble-cream-1: #f7f0e7;
  --ble-cream-2: #efe5da;
  --ble-sand-1: #ddc6b5;
  --ble-sand-2: #c8ab98;
  --ble-rose-1: #e7c1b7;
  --ble-rose-2: #c89587;
  --ble-shadow: rgba(89, 58, 48, 0.16);
  --ble-text: #46352f;
  --ble-text-soft: rgba(70, 53, 47, 0.72);
  --ble-line: rgba(255, 255, 255, 0.46);
  --ble-card: rgba(255, 255, 255, 0.42);
  --ble-card-edge: rgba(255, 255, 255, 0.68);
  --ble-button-bg: rgba(70, 53, 47, 0.92);
  --ble-button-text: #fff8f0;
  --ble-focus: rgba(84, 55, 47, 0.2);
  --ble-warning-bg: rgba(173, 114, 58, 0.12);
  --ble-warning-text: #7d4c1f;
}

* {
  box-sizing: border-box;
}

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

body.ble-login-body {
  min-height: 100vh;
  overflow: hidden;
  color: var(--ble-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 252, 246, 0.95) 0, rgba(255, 248, 236, 0.8) 10%, rgba(255, 248, 236, 0) 24%),
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.62) 0, rgba(255, 255, 255, 0) 22%),
    linear-gradient(180deg, #f9f3ec 0%, #f4ece3 28%, #eadfd5 46%, #e5d6cc 52%, #dfcbbb 66%, #cfb1a0 100%);
}

.ble-scene,
.ble-scene * {
  pointer-events: none;
}

.ble-scene {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.ble-sun-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(12px);
  opacity: 0.95;
}

.ble-sun-glow-one {
  top: -12vh;
  left: -8vw;
  width: 46vw;
  height: 30vw;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.98) 0%, rgba(255, 244, 221, 0.92) 34%, rgba(255, 244, 221, 0) 74%);
}

.ble-sun-glow-two {
  top: 6vh;
  right: 8vw;
  width: 28vw;
  height: 18vw;
  background: radial-gradient(circle, rgba(255, 252, 246, 0.75) 0%, rgba(255, 252, 246, 0) 72%);
  filter: blur(18px);
}

.ble-haze {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0, rgba(255, 255, 255, 0) 42%),
    linear-gradient(180deg, rgba(244, 232, 223, 0) 42%, rgba(241, 227, 218, 0.38) 54%, rgba(231, 210, 199, 0.24) 100%);
}

.ble-salt-bed {
  position: absolute;
  left: -4vw;
  right: -4vw;
  bottom: -8vh;
  height: 54vh;
  border-radius: 55% 45% 0 0 / 12% 18% 0 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.02) 20%),
    linear-gradient(180deg, rgba(240, 221, 212, 0.12) 0%, rgba(212, 176, 164, 0.26) 100%),
    radial-gradient(circle at 12% 20%, rgba(255, 247, 244, 0.72) 0 0.9%, rgba(255, 247, 244, 0) 1.35%) 0 0 / 10vw 7vw,
    radial-gradient(circle at 46% 56%, rgba(255, 255, 255, 0.66) 0 0.75%, rgba(255, 255, 255, 0) 1.25%) 0 0 / 7vw 6vw,
    radial-gradient(circle at 72% 38%, rgba(255, 244, 240, 0.52) 0 0.7%, rgba(255, 244, 240, 0) 1.1%) 0 0 / 8vw 7vw,
    radial-gradient(circle at 24% 64%, rgba(255, 255, 255, 0.36) 0 0.65%, rgba(255, 255, 255, 0) 1%) 0 0 / 6vw 5vw,
    linear-gradient(180deg, #efd6cc 0%, #debaa9 38%, #c79c8c 100%);
  box-shadow:
    inset 0 20px 34px rgba(255, 255, 255, 0.22),
    inset 0 -18px 50px rgba(142, 96, 82, 0.18),
    0 -14px 40px rgba(255, 255, 255, 0.08);
  transform: perspective(1200px) rotateX(18deg);
}

.ble-salt-bed::before,
.ble-salt-bed::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.ble-salt-bed::before {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.18) 16%, rgba(255, 255, 255, 0) 36%, rgba(255, 255, 255, 0.16) 52%, rgba(255, 255, 255, 0) 62%),
    repeating-linear-gradient(112deg, rgba(255, 248, 245, 0.08) 0 1px, rgba(255, 248, 245, 0) 1px 10px),
    repeating-linear-gradient(58deg, rgba(255, 255, 255, 0.05) 0 1px, rgba(255, 255, 255, 0) 1px 12px);
  opacity: 0.85;
  mix-blend-mode: screen;
}

.ble-salt-bed::after {
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.32) 0 0.4%, rgba(255, 255, 255, 0) 0.9%) 0 0 / 8vw 6vw,
    radial-gradient(circle at 68% 48%, rgba(255, 255, 255, 0.26) 0 0.45%, rgba(255, 255, 255, 0) 0.95%) 0 0 / 7vw 5vw,
    radial-gradient(circle at 88% 28%, rgba(255, 255, 255, 0.22) 0 0.35%, rgba(255, 255, 255, 0) 0.85%) 0 0 / 9vw 7vw;
  opacity: 0.95;
}

.ble-sparkle {
  position: absolute;
  inset: 42vh -4vw 0;
  opacity: 0.42;
  mix-blend-mode: screen;
  animation: bleShimmer 16s linear infinite;
}

.ble-sparkle-one {
  background:
    radial-gradient(circle at 10% 24%, rgba(255, 255, 255, 0.95) 0 1px, rgba(255, 255, 255, 0) 2.2px),
    radial-gradient(circle at 34% 56%, rgba(255, 251, 247, 0.85) 0 1px, rgba(255, 251, 247, 0) 2.1px),
    radial-gradient(circle at 61% 38%, rgba(255, 255, 255, 0.8) 0 1px, rgba(255, 255, 255, 0) 2.4px),
    radial-gradient(circle at 84% 72%, rgba(255, 250, 246, 0.7) 0 1px, rgba(255, 250, 246, 0) 2.3px);
  background-size: 18vw 14vw;
}

.ble-sparkle-two {
  background:
    radial-gradient(circle at 16% 60%, rgba(255, 255, 255, 0.8) 0 0.9px, rgba(255, 255, 255, 0) 2.1px),
    radial-gradient(circle at 44% 26%, rgba(255, 254, 251, 0.72) 0 1px, rgba(255, 254, 251, 0) 2.2px),
    radial-gradient(circle at 72% 58%, rgba(255, 255, 255, 0.68) 0 0.9px, rgba(255, 255, 255, 0) 2px),
    radial-gradient(circle at 90% 22%, rgba(255, 248, 243, 0.6) 0 0.9px, rgba(255, 248, 243, 0) 2px);
  background-size: 16vw 12vw;
  animation-duration: 20s;
  animation-direction: reverse;
}

.ble-shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(24px, 5vw, 48px);
}

.ble-card {
  position: relative;
  width: min(100%, 440px);
  padding: clamp(26px, 4vw, 34px);
  border-radius: 30px;
  border: 1px solid var(--ble-card-edge);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62) 0%, rgba(255, 255, 255, 0.4) 100%);
  backdrop-filter: blur(22px) saturate(120%);
  -webkit-backdrop-filter: blur(22px) saturate(120%);
  box-shadow:
    0 26px 70px var(--ble-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.ble-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0.08) 44%, rgba(255, 255, 255, 0.16) 100%);
  pointer-events: none;
}

.ble-card-header {
  position: relative;
  z-index: 1;
  margin-bottom: 20px;
  text-align: center;
}

.ble-brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  max-width: 100%;
  padding: 0 16px;
  margin: 0 auto 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.62);
  color: var(--ble-text-soft);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ble-brand-badge-link {
  text-decoration: none;
}

.ble-brand-badge-link:hover,
.ble-brand-badge-link:focus-visible {
  color: var(--ble-text);
  text-decoration: none;
}

.ble-title {
  margin: 0;
  font-size: clamp(1.9rem, 6vw, 2.2rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.ble-form {
  position: relative;
  z-index: 1;
}

.ble-alert {
  margin: 0 0 18px;
  padding: 13px 15px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.4;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.ble-alert + .ble-alert {
  margin-top: -4px;
}

.ble-alert-info {
  background: rgba(255, 255, 255, 0.46);
  color: var(--ble-text);
}

.ble-alert-warning {
  background: var(--ble-warning-bg);
  color: var(--ble-warning-text);
}

.ble-alert-error {
  background: rgba(104, 50, 50, 0.08);
  color: #6d3732;
}

.ble-field + .ble-field {
  margin-top: 18px;
}

.ble-field label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ble-text-soft);
}

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

.ble-field input {
  width: 100%;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 18px;
  padding: 16px 18px;
  font-size: 1rem;
  line-height: 1.2;
  color: var(--ble-text);
  background: rgba(255, 255, 255, 0.68);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 12px 24px rgba(255, 255, 255, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.ble-password-wrap input {
  padding-right: 80px;
}

.ble-field input:focus {
  outline: none;
  border-color: rgba(84, 55, 47, 0.24);
  background: rgba(255, 255, 255, 0.84);
  transform: translateY(-1px);
  box-shadow:
    0 0 0 5px var(--ble-focus),
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 18px 30px rgba(122, 93, 84, 0.12);
}

.ble-password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  min-height: 38px;
  padding: 8px 18px;
  background: rgba(70, 53, 47, 0.12);
  color: var(--ble-text);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.ble-password-toggle:hover,
.ble-password-toggle:focus-visible {
  background: rgba(70, 53, 47, 0.14);
  color: var(--ble-text);
}

.ble-password-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(84, 55, 47, 0.12);
}

.ble-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
}

.ble-text-link {
  color: var(--ble-text-soft);
  text-decoration: none;
  font-size: 0.92rem;
  line-height: 1.3;
  position: relative;
}

.ble-text-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform-origin: left;
  transform: scaleX(0);
  opacity: 0;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.18s ease;
}

.ble-text-link:hover,
.ble-text-link:focus-visible {
  color: var(--ble-text);
}

.ble-text-link:hover::after,
.ble-text-link:focus-visible::after {
  transform: scaleX(1);
  opacity: 0.8;
}

.ble-submit {
  width: 100%;
  margin-top: 22px;
  border: 0;
  border-radius: 18px;
  padding: 17px 20px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ble-button-text);
  background:
    linear-gradient(180deg, rgba(78, 58, 51, 0.96) 0%, rgba(62, 44, 39, 0.98) 100%);
  box-shadow:
    0 18px 30px rgba(62, 44, 39, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, opacity 0.22s ease;
}

.ble-submit:hover,
.ble-submit:focus-visible {
  transform: translateY(-1px);
  box-shadow:
    0 22px 36px rgba(62, 44, 39, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.ble-submit:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 5px rgba(84, 55, 47, 0.18),
    0 22px 36px rgba(62, 44, 39, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.ble-submit:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.ble-secondary-nav {
  margin-top: 16px;
  text-align: center;
}

.ble-home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ble-text-soft);
  text-decoration: none;
  font-size: 0.94rem;
  line-height: 1.3;
  transition: color 0.2s ease, transform 0.2s ease;
}

.ble-home-link::before {
  content: "<";
  font-size: 0.82rem;
  line-height: 1;
}

.ble-home-link:hover,
.ble-home-link:focus-visible {
  color: var(--ble-text);
  transform: translateX(-1px);
}

.ble-home-link:focus-visible {
  outline: none;
}

@keyframes bleShimmer {
  0% {
    transform: translate3d(0, 0, 0);
    opacity: 0.2;
  }
  25% {
    opacity: 0.46;
  }
  50% {
    transform: translate3d(1.6vw, -1.2vh, 0);
    opacity: 0.28;
  }
  75% {
    opacity: 0.42;
  }
  100% {
    transform: translate3d(0, 0, 0);
    opacity: 0.2;
  }
}

@media (max-width: 640px) {
  body.ble-login-body {
    overflow-y: auto;
  }

  .ble-shell {
    place-items: end center;
    padding: 20px;
  }

  .ble-card {
    width: 100%;
    max-width: 100%;
    border-radius: 26px;
    padding: 22px;
    margin-bottom: 18px;
  }

  .ble-title {
    font-size: clamp(1.8rem, 9vw, 2.05rem);
  }

  .ble-actions-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .ble-text-link {
    text-align: left;
  }

  .ble-password-toggle {
    right: 8px;
    padding: 8px 10px;
  }

  .ble-sun-glow-one {
    width: 78vw;
    height: 52vw;
    left: -18vw;
  }

  .ble-sun-glow-two {
    width: 48vw;
    height: 30vw;
    right: -6vw;
  }

  .ble-salt-bed {
    height: 48vh;
    transform: perspective(1000px) rotateX(14deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ble-sparkle {
    animation: none;
  }

  .ble-field input,
  .ble-submit,
  .ble-text-link::after,
  .ble-password-toggle {
    transition: none;
  }
}
