/* Wholesale login — separate ads + compact form */

:root {
  --navy: #2c4a44;
  --navy-deep: #1c332f;
  --navy-mid: #3e6259;
  --sky: #6fa08c;
  --gold: #c48b6a;
  --cream: #e8d4c4;
  --ink: #2a3834;
  --muted: #6a7b74;
  --line: #d7e0d9;
  --danger: #c45c5c;
  --surface: #fcfaf6;
  --navy-rgb: 44, 74, 68;
  --sky-rgb: 111, 160, 140;
  --gold-rgb: 196, 139, 106;
}

html[data-admin-palette="harbour"] {
  --navy: #0c4450;
  --navy-deep: #072f38;
  --navy-mid: #176070;
  --sky: #2ebbc8;
  --gold: #e08942;
  --cream: #f3c99a;
  --ink: #14343b;
  --muted: #5b7278;
  --line: #d0e4e7;
  --danger: #dc3b4a;
  --surface: #ffffff;
  --navy-rgb: 12, 68, 80;
  --sky-rgb: 46, 187, 200;
  --gold-rgb: 224, 137, 66;
}

html[data-admin-palette="safecore"] {
  --navy: #002048;
  --navy-deep: #001530;
  --navy-mid: #0a4078;
  --sky: #2a6ba8;
  --gold: #e42f22;
  --cream: #f5c4be;
  --ink: #0d1f33;
  --muted: #5a6e82;
  --line: #d5e0eb;
  --danger: #e42f22;
  --surface: #fbfcff;
  --navy-rgb: 0, 32, 72;
  --sky-rgb: 42, 107, 168;
  --gold-rgb: 228, 47, 34;
}

html[data-admin-palette="classic"] {
  --navy: #123a5c;
  --navy-deep: #0b2740;
  --navy-mid: #1a4d73;
  --sky: #4f9ad4;
  --gold: #c9a46c;
  --cream: #e7cfa8;
  --ink: #1b2b3a;
  --muted: #5d6d7c;
  --line: #dce5ee;
  --navy-rgb: 18, 58, 92;
  --sky-rgb: 79, 154, 212;
  --gold-rgb: 201, 164, 108;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
}

body.auth-login {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.15rem;
  overflow-x: hidden;
  font-family: "Plus Jakarta Sans", "Public Sans", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(880px 300px at 92% -10%, rgba(var(--sky-rgb), 0.32), transparent 58%),
    radial-gradient(680px 260px at 4% 110%, rgba(var(--gold-rgb), 0.22), transparent 54%),
    linear-gradient(158deg, #0f1c1a 0%, var(--navy-deep) 48%, var(--navy) 100%);
}

body.auth-login::before,
body.auth-login::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

body.auth-login::before {
  width: 260px;
  height: 260px;
  top: 10%;
  left: -80px;
  background: radial-gradient(circle, rgba(var(--sky-rgb), 0.28), transparent 68%);
  animation: drift 12s ease-in-out infinite;
}

body.auth-login::after {
  width: 220px;
  height: 220px;
  right: -56px;
  bottom: 8%;
  background: radial-gradient(circle, rgba(var(--gold-rgb), 0.24), transparent 68%);
  animation: drift 14s ease-in-out infinite reverse;
}

.auth-stage {
  width: min(1040px, 100%);
  height: min(540px, calc(100vh - 2.3rem));
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(300px, 360px);
  gap: 22px;
  align-items: stretch;
  animation: rise 0.42s ease-out;
}

.ads-card,
.login-card {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  box-shadow:
    0 24px 56px rgba(4, 16, 28, 0.38),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

.ads-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: 16px 16px 14px;
  color: #fff;
  background:
    radial-gradient(420px 180px at 8% 0%, rgba(var(--sky-rgb), 0.28), transparent 58%),
    radial-gradient(340px 150px at 96% 100%, rgba(var(--gold-rgb), 0.16), transparent 55%),
    linear-gradient(165deg, var(--navy-deep) 0%, var(--navy) 50%, var(--navy-mid) 100%);
}

.ads-head {
  flex: 0 0 auto;
  padding: 4px 6px 12px;
}

.ads-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(var(--gold-rgb), 0.16);
  border: 1px solid rgba(var(--gold-rgb), 0.4);
  color: var(--cream);
  font-size: 0.64rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ads-kicker i { font-size: 0.6rem; color: var(--gold); }

.ads-head p {
  margin: 0;
  max-width: 42ch;
  font-size: 0.78rem;
  line-height: 1.4;
  color: rgba(232, 241, 248, 0.76);
}

.ads-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--navy-deep);
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.26),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.ads-carousel {
  position: absolute;
  inset: 0;
}

.ads-carousel,
.ads-carousel .carousel-inner,
.ads-carousel .carousel-item {
  height: 100%;
}

.ads-carousel .carousel-item {
  position: absolute;
  inset: 0;
  background: var(--navy-deep);
}

.ads-carousel .carousel-item.active,
.ads-carousel .carousel-item-next,
.ads-carousel .carousel-item-prev {
  display: block;
}

.ads-carousel .carousel-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.ads-carousel .carousel-indicators {
  z-index: 4;
  margin-bottom: 10px;
}

.ads-carousel .carousel-indicators button {
  width: 7px;
  height: 7px;
  border: 0;
  border-radius: 50%;
  margin: 0 3px;
  background: rgba(255, 255, 255, 0.4);
}

.ads-carousel .carousel-indicators .active {
  width: 18px;
  border-radius: 40px;
  background: #fff;
}

.ads-carousel .carousel-control-prev,
.ads-carousel .carousel-control-next {
  width: auto;
  opacity: 1;
}

.ads-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0 8px;
  border-radius: 50%;
  background: rgba(6, 20, 36, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 0.72rem;
  backdrop-filter: blur(8px);
  transition: background 0.18s ease, transform 0.18s ease;
}

.ads-carousel .carousel-control-prev:hover .ads-nav,
.ads-carousel .carousel-control-next:hover .ads-nav {
  background: rgba(6, 20, 36, 0.82);
  transform: scale(1.06);
}

.ads-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0 4px;
  list-style: none;
}

.ads-pills li {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #d7e6f2;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.login-card {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 0;
  padding: 28px 26px 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f3fafb 100%);
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--sky) 52%, var(--cream) 100%);
}

.form-wrap {
  width: 100%;
  max-width: 308px;
}

.logo {
  text-align: center;
  margin-bottom: 14px;
}

.logo img {
  height: 42px;
  width: auto;
  filter: drop-shadow(0 8px 16px rgba(var(--navy-rgb), 0.12));
}

.heading {
  text-align: center;
  margin-bottom: 18px;
}

.heading span {
  display: block;
  margin-bottom: 4px;
  font-size: 0.64rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--gold);
}

.heading h1 {
  margin: 0 0 4px;
  font-size: 1.38rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--navy);
}

.heading p {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 550;
  color: var(--muted);
}

.form-group { margin-bottom: 11px; }

.form-label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.64rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.field-control { position: relative; }

.field-control > i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.74rem;
  color: #7d90a1;
  pointer-events: none;
}

.form-control {
  width: 100%;
  min-height: 42px;
  padding: 0.42rem 0.85rem 0.42rem 2.15rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f2f8f9;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.form-control::placeholder { color: #93a4b3; font-weight: 500; }

.form-control:focus {
  outline: none;
  border-color: var(--sky);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(var(--sky-rgb), 0.18);
}

.form-control.is-invalid {
  border-color: #f0b4ba;
  background: #fff8f8;
}

.password-input-wrapper .form-control { padding-right: 2.55rem; }

.password-toggle {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #668aa8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.password-toggle:hover {
  color: var(--navy);
  background: rgba(var(--navy-rgb), 0.06);
}

.text-danger {
  display: block;
  margin-top: 4px;
  color: var(--danger) !important;
  font-size: 0.74rem;
  font-weight: 650;
}

.auth-alert {
  margin-bottom: 10px;
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
  background: #fdecee;
  color: #a81f2c;
  font-size: 0.76rem;
  font-weight: 650;
}

.auth-alert.is-ok {
  background: #e5f6ef;
  color: #14664a;
}

.btn-signin {
  width: 100%;
  min-height: 42px;
  margin-top: 4px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 52%, var(--navy-mid) 100%);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 750;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  box-shadow: 0 10px 20px rgba(var(--navy-rgb), 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn-signin:hover {
  color: #fff;
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(var(--navy-rgb), 0.32);
}

.btn-signin:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

.secure-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 12px 0 0;
  font-size: 0.7rem;
  font-weight: 600;
  color: #7b8d9c;
}

.secure-note i { color: var(--sky); }

@keyframes rise {
  from { opacity: 0; transform: translateY(12px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(16px, -12px, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .auth-stage,
  body.auth-login::before,
  body.auth-login::after {
    animation: none;
  }

  .btn-signin { transition: none; }
  .btn-signin:hover { transform: none; }
}

@media (max-width: 991px) {
  .auth-stage {
    height: auto;
    grid-template-columns: 1fr;
    grid-template-areas:
      "login"
      "ads";
    max-width: 420px;
    gap: 16px;
  }

  .login-card {
    grid-area: login;
    height: auto;
    padding: 24px 22px 18px;
  }

  .ads-card {
    grid-area: ads;
    height: auto;
    min-height: 0;
    padding: 14px;
  }

  .ads-stage { min-height: 210px; height: 210px; }

  .ads-head p { font-size: 0.74rem; }
}

@media (max-width: 480px) {
  body.auth-login { padding: 0.7rem; }

  .ads-card,
  .login-card { border-radius: 18px; }

  .login-card { padding: 22px 16px 16px; }

  .heading h1 { font-size: 1.26rem; }

  .form-control { font-size: 16px; }

  .ads-stage { height: 180px; min-height: 180px; }

  .ads-nav { width: 28px; height: 28px; margin: 0 4px; }
}
