/* Merchant /admin login shell (shared with KOL Hub guest) */
:root {
  --ma-teal: #4858d8;
  --ma-teal-deep: #3a48c0;
  --ma-ink: #14161f;
  --ma-muted: #667085;
}

body.ma-on-login {
  background: #07090e;
  margin: 0;
  overflow: hidden;
}

.ma-login {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  min-height: 100dvh;
  width: 100%;
  overflow: hidden;
  background: #07090e;
}

.ma-login-stage {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(28px, 5vw, 64px);
  color: #f4f1ea;
  overflow: hidden;
}

.ma-login-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: #0b1020 center/cover no-repeat;
  transform: scale(1.04);
  animation: maLoginKen 28s ease-in-out infinite alternate;
}

.ma-login-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(105deg, rgba(7, 9, 14, 0.88) 8%, rgba(7, 9, 14, 0.42) 52%, rgba(7, 9, 14, 0.72) 100%),
    linear-gradient(180deg, rgba(7, 9, 14, 0.2) 0%, rgba(7, 9, 14, 0.78) 100%);
}

.ma-login-stage::after {
  content: "";
  position: absolute;
  inset: auto -10% -20% 20%;
  z-index: -1;
  height: 55%;
  background: radial-gradient(ellipse at center, rgba(72, 88, 216, 0.22), transparent 68%);
  pointer-events: none;
  animation: maLoginGlow 8s ease-in-out infinite alternate;
}

.ma-login-brand {
  margin: 0 0 18px;
  font-family: Syne, "Plus Jakarta Sans", sans-serif;
  font-size: clamp(2.8rem, 6vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.92;
  color: #fff;
  animation: maLoginRise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ma-login-brand em {
  font-style: normal;
  color: #a5b4fc;
}

.ma-login-stage h2 {
  margin: 0 0 12px;
  max-width: 18ch;
  font-family: Syne, "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.94);
}

.ma-login-stage p {
  margin: 0;
  max-width: 36ch;
  font-size: 0.98rem;
  line-height: 1.6;
  color: rgba(244, 241, 234, 0.68);
}

.ma-login-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 28px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.ma-login-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ma-login-meta span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4858d8;
  box-shadow: 0 0 0 3px rgba(72, 88, 216, 0.22);
}

.ma-login-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 56px) clamp(24px, 4.5vw, 64px);
  background: linear-gradient(180deg, #fbfbfc 0%, #f3f5f8 100%);
  color: var(--ma-ink);
  overflow: auto;
}

.ma-login-panel-inner {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.ma-login-kicker {
  margin: 0 0 10px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ma-teal-deep);
}

.ma-login-panel h1 {
  margin: 0 0 8px;
  font-family: Syne, "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.7rem, 2.5vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.ma-login-panel .lead {
  margin: 0 0 28px;
  color: var(--ma-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.ma-login-label {
  display: block;
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #475467;
}

.ma-field {
  width: 100%;
  border: 1px solid rgba(15, 20, 35, 0.1);
  border-radius: 14px;
  padding: 14px 16px;
  font: inherit;
  font-size: 0.92rem;
  background: #fff;
  margin-bottom: 14px;
  box-sizing: border-box;
}

.ma-field:focus {
  outline: none;
  border-color: rgba(72, 88, 216, 0.55);
  box-shadow: 0 0 0 4px rgba(72, 88, 216, 0.14);
}

.ma-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.ma-btn-block {
  width: 100%;
}

.ma-btn-primary {
  min-height: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, #3a48c0 0%, #4858d8 55%, #7c8aef 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(72, 88, 216, 0.28);
}

.ma-btn-primary:hover {
  transform: translateY(-1px);
}

.ma-btn-ghost {
  background: #fff;
  border: 1px solid rgba(15, 20, 35, 0.12);
  border-radius: 14px;
  padding: 12px;
  color: var(--ma-ink);
}

.ma-err {
  color: #dc2626;
  font-size: 0.85rem;
  margin: 0 0 10px;
}

.ma-auth-step.hidden {
  display: none !important;
}

.ma-auth-back {
  display: inline-flex;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  color: #667085;
  cursor: pointer;
}

.ma-auth-identity {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 20, 35, 0.05);
  border: 1px solid rgba(15, 20, 35, 0.08);
  font-size: 0.86rem;
  max-width: 100%;
}

.ma-auth-identity span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ma-auth-identity button {
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  color: #3a48c0;
  cursor: pointer;
}

.ma-auth-switch {
  margin: 28px 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: #667085;
}

.ma-auth-switch button {
  border: 0;
  background: none;
  font: inherit;
  font-weight: 750;
  color: #3a48c0;
  cursor: pointer;
  text-decoration: underline;
}

.ma-oauth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 12px;
  color: #94a3b8;
  font-size: 0.8rem;
}
.ma-oauth-divider::before,
.ma-oauth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}
.ma-oauth-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ma-oauth-btn {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.ma-oauth-btn:hover { border-color: #cbd5e1; }

.ma-login-foot {
  margin-top: 28px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: rgba(15, 20, 35, 0.38);
}

.hidden {
  display: none !important;
}

@keyframes maLoginRise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes maLoginKen {
  from {
    transform: scale(1.04);
  }
  to {
    transform: scale(1.1) translate3d(-1.2%, -0.8%, 0);
  }
}

@keyframes maLoginGlow {
  from {
    opacity: 0.55;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 900px) {
  .ma-login {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(240px, 38dvh) 1fr;
  }
  .ma-login-stage {
    padding: 24px 22px 28px;
    justify-content: flex-end;
  }
  .ma-login-stage p {
    display: none;
  }
  .ma-login-panel {
    border-radius: 24px 24px 0 0;
    margin-top: -18px;
  }
}
