/* Auth login — advanced light Nimblur (dashboard-aligned) */

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

html,
body.auth-body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: #12081f;
  color: var(--color-text, #111827);
}

.login-page {
  --nb-login-purple: #8500d8;
  --nb-login-pink: #fe458d;
  --nb-login-violet: #7c3aed;
  --nb-login-ink: #111827;
  --nb-login-muted: #6b7280;
  --nb-login-border: rgba(148, 163, 184, 0.32);
  --nb-login-surface: #ffffff;
  --nb-login-display: 'Outfit', 'Plus Jakarta Sans', system-ui, sans-serif;
  --nb-login-gradient: linear-gradient(135deg, #8500d8 0%, #fe458d 100%);
  --nb-login-gradient-text: linear-gradient(90deg, #8500d8 0%, #fe458d 100%);
  --nb-login-ease: cubic-bezier(0.34, 1.2, 0.64, 1);
  --shell-max: 1380px;
  /* Sides keep the centering room; top/bottom only a light inset */
  --page-frame-x: max(1.5rem, calc((100vw - var(--shell-max)) / 2));
  --page-frame-y: clamp(0.45rem, 0.9vh, 0.7rem);
  --page-frame: var(--page-frame-y);

  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  box-sizing: border-box;
  height: auto;
  min-height: 100dvh;
  max-height: none;
  padding: var(--page-frame-y) var(--page-frame-x);
  gap: 0.5rem;
  overflow-x: hidden;
  overflow-y: visible;
  background-color: #12081f;
  background-image: url('/images/backgrounds/login-neon-finance.png');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

/* Near-clear veil so the neon finance background stays sharp */
.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: transparent;
}

.login-page__mesh {
  display: none;
}

.login-page__glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(56px);
  z-index: 0;
}

.login-page__glow--tl,
.login-page__glow--br,
.login-page__glow--mid {
  display: none;
}

/* Top bar inside shell — separate from login card */
.login-shell__top {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  grid-column: 1 / -1;
  grid-row: 1;
  margin-bottom: 0;
  padding: 0.15rem clamp(0.35rem, 1vw, 0.75rem) 0 clamp(1.1rem, 2vw, 1.85rem);
  border-bottom: none;
  pointer-events: auto;
}

.login-shell__body {
  display: contents;
}

.login-topbar {
  display: none;
}

.login-topbar__brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  line-height: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

/* Larger logo to match ref scale */
.login-topbar__brand img,
.login-logo {
  display: block !important;
  height: 62px !important;
  max-height: 62px !important;
  width: auto !important;
  max-width: 290px !important;
  object-fit: contain !important;
}

/* Prevent any leftover full-width brand images inside the shell */
.login-brand-panel > img,
.login-brand-panel .brand-logo,
.login-shell img.brand-logo,
.login-page img.brand-logo {
  display: none !important;
}

.login-topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.login-lang {
  position: relative;
}

.login-lang__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--nb-login-muted);
  font: 600 13px/1.2 'Plus Jakarta Sans', system-ui, sans-serif;
  cursor: pointer;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.login-lang__btn:hover,
.login-lang__btn[aria-expanded="true"] {
  border-color: rgba(133, 0, 216, 0.35);
  color: var(--nb-login-ink);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 0 0 3px rgba(133, 0, 216, 0.1);
}

.login-lang__btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-lang__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  min-width: 200px;
  border: 1px solid var(--nb-login-border);
  border-radius: 14px;
  background: var(--nb-login-surface);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  z-index: 20;
}

[dir="rtl"] .login-lang__menu {
  right: auto;
  left: 0;
}

.login-lang__option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--nb-login-ink);
  font: 500 13px/1.3 'Plus Jakarta Sans', system-ui, sans-serif;
  cursor: pointer;
  text-align: start;
}

.login-lang__option:hover,
.login-lang__option[data-selected="true"] {
  background: rgba(133, 0, 216, 0.07);
  color: var(--nb-login-purple);
}

/* Center shell — equal outer frame on all sides */
.login-shell {
  --shell-gap: clamp(0.85rem, 1.5vw, 1.25rem);
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(400px, 460px);
  grid-template-rows: auto 1fr;
  align-items: stretch;
  column-gap: clamp(1.15rem, 2.2vw, 2rem);
  row-gap: 0.35rem;
  flex: 0 1 auto;
  align-self: center;
  width: min(var(--shell-max, 1380px), 100%);
  max-width: 100%;
  margin: 0 auto;
  padding: var(--shell-gap);
  /* Content-sized — avoid a tall empty main card */
  height: auto;
  max-height: none;
  min-height: min(720px, calc(100dvh - (2 * var(--page-frame-y)) - 5.5rem));
  border-radius: clamp(20px, 2vw, 26px);
  background-color: #ffffff;
  background-image: url('/images/backgrounds/login-card-laptop-alt.png?v=20260910e');
  /* Laptop sits in the open brand column — left stays open for white wash */
  background-position: 82% 48%;
  background-size: cover;
  background-repeat: no-repeat;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 28px 70px -24px rgba(15, 23, 42, 0.35);
  overflow: hidden;
  isolation: isolate;
  animation: nbLoginFadeUp 0.65s var(--nb-login-ease) 0.06s both;
}

/* Left white spread — bright copy area only; laptop zone stays clear */
.login-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(
      100deg,
      #ffffff 0%,
      #ffffff 16%,
      rgba(255, 255, 255, 0.97) 26%,
      rgba(255, 255, 255, 0.7) 36%,
      rgba(255, 255, 255, 0.28) 44%,
      rgba(255, 255, 255, 0.06) 52%,
      transparent 60%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.35) 0%,
      transparent 18%,
      transparent 82%,
      rgba(255, 255, 255, 0.28) 100%
    );
}

.login-shell::after {
  content: none;
}

/* Left brand panel — keep copy lower; don’t track login-card top */
.login-brand-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-self: stretch;
  grid-column: 1;
  grid-row: 2;
  gap: 0.85rem;
  min-width: 0;
  min-height: 0;
  padding: clamp(1.1rem, 2.4vh, 1.75rem) 0.5rem 0.65rem clamp(1.15rem, 2vw, 1.75rem);
}

.brand-top,
.brand-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
}

.brand-bottom {
  flex: 1 1 auto;
  justify-content: flex-start;
  gap: 0.75rem;
}

.brand-top {
  animation: nbLoginFadeUp 0.55s var(--nb-login-ease) 0.06s both;
}

.brand-message {
  max-width: 40rem;
  padding-top: clamp(0.35rem, 1.2vh, 0.85rem);
}

.brand-eyebrow {
  display: block;
  margin: 0 0 0.75rem;
  padding: 0;
  width: fit-content;
  border: 0;
  border-radius: 0;
  background: transparent;
  font: 650 12.5px/1.3 'Plus Jakarta Sans', system-ui, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #94a3b8;
  text-shadow: none;
}

.brand-eyebrow__dot {
  display: none;
}

.brand-heading {
  margin: 0 0 0.85rem;
  padding-top: clamp(0.45rem, 1.4vh, 0.9rem);
  font-family: var(--nb-login-display);
  font-size: clamp(3.15rem, 5.2vw, 4.5rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.045em;
  color: #0f172a;
}

.brand-heading__line {
  display: block;
}

.brand-heading-accent--gradient {
  position: relative;
  display: inline-block;
  margin-inline-start: 0;
  margin-top: 0.02em;
  padding-bottom: 0.12em;
  width: fit-content;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  color: #8500d8;
  -webkit-text-fill-color: #8500d8;
}

/* Soft glow wash behind the accent underline */
.brand-heading-accent--gradient::before {
  content: '';
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 0.02em;
  height: 0.42em;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(254, 69, 141, 0.35) 0%, rgba(133, 0, 216, 0.18) 45%, transparent 72%);
  filter: blur(4px);
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;
}

/* Gradient brush underline with draw-in */
.brand-heading-accent--gradient::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0.08em;
  width: 100%;
  height: 0.11em;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      rgba(133, 0, 216, 0.15) 0%,
      #8500d8 18%,
      #fe458d 72%,
      rgba(254, 69, 141, 0.25) 100%
    );
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.35),
    0 4px 14px rgba(133, 0, 216, 0.28),
    0 1px 0 rgba(254, 69, 141, 0.45);
  transform-origin: left center;
  transform: scaleX(0.18);
  opacity: 0.35;
  animation: nbLoginUnderlineIn 0.85s var(--nb-login-ease) 0.35s forwards;
  pointer-events: none;
  z-index: 1;
}

.brand-description {
  display: block;
  margin: 0;
  max-width: 36rem;
  font: 500 18px/1.55 'Plus Jakarta Sans', system-ui, sans-serif;
  color: #64748b;
  text-shadow: none;
}

.brand-description__lead,
.brand-description__tagline {
  display: block !important;
  width: 100%;
}

.brand-description__break {
  display: block !important;
  content: '';
  margin: 0;
  line-height: 0;
  height: 0;
}

.brand-description__tagline {
  margin-top: 0.2rem;
}

/* Feature cards — centered to match login ref (icon → title → subtitle) */
.brand-feature-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.55rem;
  width: fit-content;
  max-width: 100%;
  animation: nbLoginFadeUp 0.6s var(--nb-login-ease) 0.16s both;
}

.brand-feature-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  flex: 0 0 auto;
  min-width: 0;
  width: auto;
  max-width: none;
  padding: 0.25rem 0.45rem 0.35rem;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition:
    transform 0.28s var(--nb-login-ease);
  animation: nbLoginFadeUp 0.55s var(--nb-login-ease) both;
  overflow: visible;
  cursor: default;
  text-align: center;
}

.brand-feature-item::before {
  content: none;
}

.brand-feature-item:nth-child(1) {
  animation-delay: 0.2s;
}

.brand-feature-item:nth-child(2) {
  animation-delay: 0.28s;
}

.brand-feature-item:nth-child(3) {
  animation-delay: 0.36s;
}

.brand-feature-item:hover {
  transform: translateY(-4px);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.brand-feature-item:hover::before {
  opacity: 0;
}

.brand-feature-item:hover .brand-feature-item__icon {
  transform: translateY(-2px) scale(1.05);
  box-shadow:
    inset 0 0 0 1px rgba(133, 0, 216, 0.12),
    0 6px 14px rgba(133, 0, 216, 0.14);
}

.brand-feature-item--rose:hover .brand-feature-item__icon {
  box-shadow:
    inset 0 0 0 1px rgba(254, 69, 141, 0.14),
    0 6px 14px rgba(254, 69, 141, 0.14);
}

.brand-feature-item--cyan:hover .brand-feature-item__icon {
  box-shadow:
    inset 0 0 0 1px rgba(14, 165, 233, 0.16),
    0 6px 14px rgba(14, 165, 233, 0.12);
}

.brand-feature-item:hover .brand-feature-item__text strong {
  color: #8500d8;
}

.brand-feature-item--rose:hover .brand-feature-item__text strong {
  color: #be185d;
}

.brand-feature-item--cyan:hover .brand-feature-item__text strong {
  color: #0369a1;
}

.brand-feature-item__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin: 0 auto;
  border-radius: 18px;
  background: #ede9fe;
  box-shadow: none;
  transition: transform 0.28s var(--nb-login-ease), box-shadow 0.28s ease;
}

.brand-feature-item--rose .brand-feature-item__icon {
  background: #fce7f3;
  box-shadow: none;
}

.brand-feature-item--cyan .brand-feature-item__icon {
  background: #e0f2fe;
  box-shadow: none;
}

.brand-feature-item__icon svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: #7c3aed;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.28s var(--nb-login-ease);
}

.brand-feature-item:hover .brand-feature-item__icon svg {
  transform: scale(1.04);
}

.brand-feature-item--rose .brand-feature-item__icon svg {
  stroke: #e11d48;
}

.brand-feature-item--cyan .brand-feature-item__icon svg {
  stroke: #0ea5e9;
}

.brand-feature-item__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.22rem;
  min-width: 0;
  width: max-content;
  max-width: none;
  text-align: center;
}

.brand-feature-item__text strong {
  font: 700 12.5px/1.2 'Plus Jakarta Sans', system-ui, sans-serif;
  letter-spacing: -0.02em;
  color: #0f172a;
  transition: color 0.28s ease;
  white-space: nowrap;
}

.brand-feature-item__text span {
  font: 500 11px/1.25 'Plus Jakarta Sans', system-ui, sans-serif;
  color: #94a3b8;
  white-space: nowrap;
}

.brand-footer-tagline {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: auto 0 0;
  padding-top: 0.65rem;
  font: 650 12.5px/1.35 'Plus Jakarta Sans', system-ui, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
  text-shadow: none;
  opacity: 1;
  animation: nbLoginFadeUp 0.55s var(--nb-login-ease) 0.42s both;
  max-width: 100%;
  min-width: 0;
}

.brand-footer-tagline__rule {
  width: 36px;
  height: 3px;
  border-radius: 999px 0 0 999px;
  background: linear-gradient(90deg, #8500d8 0%, #fe458d 100%);
  flex: 0 0 auto;
}

/* Mini metric chips — dashboard KPI tones */
.brand-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.brand-metric {
  position: relative;
  padding: 0.7rem 0.8rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  overflow: hidden;
  isolation: isolate;
}

.brand-metric::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.brand-metric::after {
  content: '';
  position: absolute;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  right: -18px;
  bottom: -28px;
  opacity: 0.75;
  pointer-events: none;
  z-index: 0;
}

.brand-metric--violet {
  background: linear-gradient(155deg, #faf5ff 0%, #ffffff 55%, #f8fafc 100%);
}

.brand-metric--violet::before {
  background: linear-gradient(90deg, #8500d8, #a78bfa);
}

.brand-metric--violet::after {
  background: radial-gradient(circle, rgba(124, 58, 237, 0.22) 0%, transparent 70%);
}

.brand-metric--rose {
  background: linear-gradient(155deg, #fff1f7 0%, #ffffff 55%, #f8fafc 100%);
}

.brand-metric--rose::before {
  background: linear-gradient(90deg, #fe458d, #f9a8d4);
}

.brand-metric--rose::after {
  background: radial-gradient(circle, rgba(254, 69, 141, 0.22) 0%, transparent 70%);
}

.brand-metric--cyan {
  background: linear-gradient(155deg, #ecfeff 0%, #ffffff 55%, #f8fafc 100%);
}

.brand-metric--cyan::before {
  background: linear-gradient(90deg, #06b6d4, #67e8f9);
}

.brand-metric--cyan::after {
  background: radial-gradient(circle, rgba(6, 182, 212, 0.2) 0%, transparent 70%);
}

.brand-metric__label,
.brand-metric__value {
  position: relative;
  z-index: 1;
  display: block;
}

.brand-metric__label {
  font: 600 11px/1.2 'Plus Jakarta Sans', system-ui, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.2rem;
}

.brand-metric__value {
  font: 700 14px/1.2 'Plus Jakarta Sans', system-ui, sans-serif;
  color: var(--nb-login-ink);
}

/* Feature rows as soft KPI cards */
.brand-features {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.brand-feature {
  --feat-accent: #7c3aed;
  --feat-soft: rgba(124, 58, 237, 0.12);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: transform 0.25s var(--nb-login-ease), border-color 0.2s ease, box-shadow 0.25s ease;
}

.brand-feature:hover {
  transform: translateY(-2px);
  border-color: rgba(133, 0, 216, 0.35);
  box-shadow: 0 10px 24px -12px rgba(133, 0, 216, 0.35);
}

.brand-feature--violet {
  --feat-accent: #8500d8;
  --feat-soft: rgba(133, 0, 216, 0.12);
}

.brand-feature--rose {
  --feat-accent: #fe458d;
  --feat-soft: rgba(254, 69, 141, 0.12);
}

.brand-feature--cyan {
  --feat-accent: #0891b2;
  --feat-soft: rgba(6, 182, 212, 0.12);
}

.brand-feature__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: var(--feat-accent);
  background: var(--feat-soft);
}

.brand-feature__icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-feature__title {
  display: block;
  font: 700 14px/1.3 'Plus Jakarta Sans', system-ui, sans-serif;
  color: var(--nb-login-ink);
}

.brand-feature__subtitle {
  display: block;
  margin-top: 0.12rem;
  font: 500 12.5px/1.4 'Plus Jakarta Sans', system-ui, sans-serif;
  color: var(--nb-login-muted);
}

/* Mini dashboard preview */
.brand-preview {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0.85rem;
  padding: 0.9rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: linear-gradient(155deg, #ffffff 0%, #faf5ff 55%, #fff 100%);
  box-shadow: 0 8px 24px -16px rgba(15, 23, 42, 0.12);
}

.brand-preview__head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.brand-preview__title {
  font: 700 13px/1.2 'Plus Jakarta Sans', system-ui, sans-serif;
  color: var(--nb-login-ink);
}

.brand-preview__badge {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font: 700 10px/1.2 'Plus Jakarta Sans', system-ui, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8500d8;
  background: rgba(133, 0, 216, 0.1);
}

.brand-preview__chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 64px;
  padding: 0.25rem 0.15rem 0;
}

.brand-preview__bar {
  flex: 1;
  height: var(--h, 50%);
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, rgba(133, 0, 216, 0.55), rgba(254, 69, 141, 0.25));
  animation: nbLoginBarIn 0.7s var(--nb-login-ease) both;
}

.brand-preview__bar:nth-child(2) { animation-delay: 0.05s; background: linear-gradient(180deg, rgba(254, 69, 141, 0.55), rgba(254, 69, 141, 0.18)); }
.brand-preview__bar:nth-child(3) { animation-delay: 0.1s; }
.brand-preview__bar:nth-child(4) { animation-delay: 0.15s; background: linear-gradient(180deg, rgba(6, 182, 212, 0.5), rgba(6, 182, 212, 0.15)); }
.brand-preview__bar:nth-child(5) { animation-delay: 0.2s; }
.brand-preview__bar:nth-child(6) { animation-delay: 0.25s; background: linear-gradient(180deg, rgba(254, 69, 141, 0.5), rgba(133, 0, 216, 0.2)); }
.brand-preview__bar:nth-child(7) { animation-delay: 0.3s; }

.brand-preview__spark {
  display: flex;
  align-items: center;
  min-height: 64px;
}

.brand-preview__spark svg {
  width: 100%;
  height: 42px;
}

/* Right login card — starts below language bar (separate) */
.login-form-side {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  align-self: stretch;
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  height: auto;
  padding: 0.15rem 0 0.35rem;
  border-radius: 0;
  background: transparent;
  animation: nbLoginFadeUp 0.7s var(--nb-login-ease) 0.12s both;
}

.login-form-side::before {
  content: '';
  position: absolute;
  z-index: 0;
  width: min(88%, 420px);
  height: min(90%, 680px);
  right: 4%;
  top: 4%;
  transform: none;
  border-radius: 40%;
  background:
    radial-gradient(circle at 40% 35%, rgba(133, 0, 216, 0.28) 0%, transparent 58%),
    radial-gradient(circle at 70% 70%, rgba(254, 69, 141, 0.2) 0%, transparent 55%);
  filter: blur(36px);
  pointer-events: none;
}

.login-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 420px;
  height: 100%;
  min-height: 100%;
  max-height: none;
  margin: 0;
  transform: none;
  align-self: stretch;
  --card-pad: 2.25rem 1.35rem 1.5rem;
  --card-radius: 22px;
  padding: var(--card-pad);
  border-radius: var(--card-radius);
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 32px 70px rgba(15, 23, 42, 0.16),
    0 12px 28px rgba(133, 0, 216, 0.14),
    0 0 0 1px rgba(226, 232, 240, 0.65);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  min-width: 0;
  box-sizing: border-box;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--nb-login-gradient);
  border-radius: var(--card-radius) var(--card-radius) 0 0;
  z-index: 2;
  pointer-events: none;
}

.login-card::after {
  content: '';
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  right: -36px;
  top: -48px;
  background: radial-gradient(circle, rgba(254, 69, 141, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.form-header {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-bottom: 1.15rem;
  flex: 0 0 auto;
}

.form-header__mark {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.form-header__lock {
  display: none;
}

.form-header__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: var(--nb-login-gradient);
  box-shadow: 0 12px 28px rgba(133, 0, 216, 0.28);
  animation: none;
}

.form-header__icon::before {
  content: none;
}

.form-header__icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.form-header h1 {
  margin: 0 0 0.35rem;
  font-family: var(--nb-login-display);
  font-size: clamp(1.65rem, 2.2vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #0f172a;
}

.header-subtitle {
  margin: 0;
  font: 500 14px/1.45 'Plus Jakarta Sans', system-ui, sans-serif;
  color: #64748b;
}

.login-form {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1 1 auto;
  justify-content: flex-start;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.login-secure-note {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: auto 0 0;
  padding-top: 1rem;
  font: 500 12.5px/1.45 'Plus Jakarta Sans', system-ui, sans-serif;
  color: #94a3b8;
  text-align: center;
  flex: 0 0 auto;
  white-space: normal;
  max-width: 100%;
  min-width: 0;
}

.login-secure-note svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-alert {
  position: relative;
  z-index: 1;
  margin: 0 0 1rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(220, 38, 38, 0.2);
  background: rgba(254, 226, 226, 0.7);
  color: #b91c1c;
  font: 500 13px/1.4 'Plus Jakarta Sans', system-ui, sans-serif;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.form-label {
  display: block;
  margin: 0;
  padding: 0;
  font: 600 13px/1.2 'Plus Jakarta Sans', system-ui, sans-serif;
  letter-spacing: 0;
  text-transform: none;
  color: #64748b;
}

.input-shell {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.field-icon {
  position: absolute;
  left: 13px;
  display: grid;
  place-items: center;
  pointer-events: none;
  color: #8500d8;
  z-index: 1;
}

[dir="rtl"] .field-icon {
  left: auto;
  right: 13px;
}

.field-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.form-input {
  width: 100%;
  height: 54px;
  padding: 0 2.85rem 0 2.65rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 14px;
  background: #ffffff;
  color: var(--nb-login-ink);
  font: 500 15px/1.2 'Plus Jakarta Sans', system-ui, sans-serif;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

[dir="rtl"] .form-input {
  padding: 0 2.65rem 0 2.85rem;
}

.form-input::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.form-input:hover {
  border-color: rgba(133, 0, 216, 0.35);
  background: #fff;
}

.form-input:focus {
  border-color: var(--nb-login-purple);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(133, 0, 216, 0.12);
}

/* Kill yellow browser autofill — keep Nimblur surface */
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--nb-login-ink);
  caret-color: var(--nb-login-ink);
  box-shadow: 0 0 0 1000px #ffffff inset;
  transition: background-color 99999s ease-in-out 0s;
}

.password-toggle {
  position: absolute;
  right: 8px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  z-index: 1;
}

[dir="rtl"] .password-toggle {
  right: auto;
  left: 8px;
}

.password-toggle:hover {
  color: var(--nb-login-purple);
  background: rgba(133, 0, 216, 0.06);
}

.password-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle__hide {
  display: none;
}

.password-toggle.is-visible .password-toggle__show {
  display: none;
}

.password-toggle.is-visible .password-toggle__hide {
  display: block;
}

.form-options {
  display: flex;
  justify-content: flex-end;
  margin-top: -0.2rem;
}

.forgot-password-link {
  font: 700 13px/1.2 'Plus Jakarta Sans', system-ui, sans-serif;
  color: var(--nb-login-purple);
  text-decoration: none;
}

.forgot-password-link:hover {
  color: var(--nb-login-pink);
  text-decoration: underline;
}

.login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  flex-shrink: 0;
  width: 100%;
  height: 54px;
  margin-top: 0.35rem;
  border: 0;
  border-radius: 999px;
  background: var(--nb-login-gradient);
  color: #fff;
  font: 700 15px/1 'Plus Jakarta Sans', system-ui, sans-serif;
  cursor: pointer;
  box-shadow:
    0 12px 28px rgba(133, 0, 216, 0.32),
    0 2px 0 rgba(255, 255, 255, 0.2) inset;
  transition: transform 0.2s var(--nb-login-ease), box-shadow 0.2s ease, filter 0.2s ease;
}

.login-button:hover {
  filter: brightness(1.05);
  box-shadow: 0 16px 34px rgba(133, 0, 216, 0.38);
  transform: translateY(-2px);
}

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

.login-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[dir="rtl"] .login-button svg {
  transform: scaleX(-1);
}

.login-footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1rem;
  flex: 0 0 auto;
  width: min(var(--shell-max, 1380px), 100%);
  margin: 0 auto;
  padding: 0;
  font: 500 12px/1.4 'Plus Jakarta Sans', system-ui, sans-serif;
  color: rgba(255, 255, 255, 0.88);
  text-align: center;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
  animation: nbLoginFadeUp 0.55s var(--nb-login-ease) 0.18s both;
}

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

@keyframes nbLoginUnderlineIn {
  from {
    transform: scaleX(0.18);
    opacity: 0.35;
  }
  to {
    transform: scaleX(1);
    opacity: 1;
  }
}

/* Short screens: tighten so the card still fits without clipping the CTA */
@media (max-height: 900px) {
  .login-shell {
    --shell-gap: 0.85rem;
    gap: 0.85rem;
    min-height: 0;
  }

  .login-shell__top {
    margin-bottom: 0.15rem;
    padding-bottom: 0.55rem;
  }

  .brand-heading {
    font-size: clamp(2.1rem, 3.4vw, 2.85rem);
    margin-bottom: 0.45rem;
  }

  .brand-description {
    font-size: 0.95rem;
  }

  .brand-feature-list {
    gap: 0.4rem;
  }

  .brand-feature-item {
    width: auto;
    max-width: none;
    padding: 0.2rem 0.35rem 0.3rem;
  }

  .brand-feature-item__icon {
    width: 58px;
    height: 58px;
  }

  .brand-feature-item__icon svg {
    width: 28px;
    height: 28px;
  }

  .brand-feature-item__text strong {
    font-size: 12px;
  }

  .brand-feature-item__text span {
    font-size: 10.5px;
  }

  .brand-footer-tagline {
    padding-top: 0;
    margin-top: 0.35rem;
  }

  .login-card {
    --card-pad: 1.75rem 1.25rem 1.25rem;
    min-height: 100%;
    height: 100%;
  }

  .form-header {
    margin-bottom: 0.85rem;
  }

  .form-header__mark {
    margin-bottom: 0.65rem;
  }

  .form-header__icon {
    width: 48px;
    height: 48px;
  }

  .login-form {
    gap: 0.85rem;
  }

  .form-input {
    height: 48px;
  }

  .login-button {
    height: 48px;
  }

  .login-secure-note {
    padding-top: 0.75rem;
    font-size: 11.5px;
  }
}

@media (max-height: 820px) {
  .login-shell {
    --shell-gap: 0.75rem;
  }

  .brand-heading {
    font-size: clamp(1.95rem, 3.2vw, 2.55rem);
  }

  .brand-feature-item {
    width: auto;
    max-width: none;
    padding: 0.2rem 0.25rem 0.3rem;
  }
}

@keyframes nbLoginBarIn {
  from {
    transform: scaleY(0.35);
    opacity: 0.4;
  }
  to {
    transform: scaleY(1);
    opacity: 1;
  }
}

@keyframes nbLoginLockPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow:
      0 12px 28px rgba(133, 0, 216, 0.32),
      0 0 0 6px rgba(133, 0, 216, 0.1);
  }
  50% {
    transform: scale(1.06);
    box-shadow:
      0 16px 36px rgba(133, 0, 216, 0.42),
      0 0 0 10px rgba(254, 69, 141, 0.12);
  }
}

@keyframes nbLoginLockRing {
  0% {
    transform: scale(0.85);
    opacity: 0.7;
  }
  70% {
    transform: scale(1.35);
    opacity: 0;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

.brand-preview__bar {
  transform-origin: bottom;
}

/* Responsive — large desktop base rules above stay as the default look */

/* Keep original proportions when the window shrinks — don’t stretch shell/card tall */
@media (max-width: 1500px) {
  .login-page {
    --page-frame-y: clamp(0.4rem, 1vh, 0.7rem);
    justify-content: center;
  }

  .login-shell {
    min-height: 0;
    height: auto;
    max-height: min(780px, calc(100dvh - 3.5rem));
    --shell-gap: clamp(0.7rem, 1.2vw, 1rem);
  }

  .login-form-side {
    align-items: stretch;
    align-self: stretch;
  }

  .login-card {
    min-height: 100%;
    height: 100%;
    align-self: stretch;
    max-width: 400px;
    --card-pad: 2rem 1.25rem 1.35rem;
  }

  .form-header {
    margin-bottom: 1rem;
  }

  .login-form {
    gap: 0.95rem;
    justify-content: flex-start;
  }

  .form-input,
  .login-button {
    height: 52px;
  }

  .login-secure-note {
    padding-top: 1rem;
  }
}

/* Mid desktop: ease columns before stacking; reduce laptop collision */
@media (max-width: 1360px) {
  .login-shell {
    grid-template-columns: minmax(0, 1.15fr) minmax(min(100%, 380px), 460px);
    column-gap: clamp(1rem, 2vw, 1.75rem);
    --shell-gap: clamp(0.85rem, 1.4vw, 1.15rem);
    background-position: 76% 48%;
    min-height: 0;
    height: auto;
  }

  .login-shell::before {
    background:
      linear-gradient(
        100deg,
        #ffffff 0%,
        #ffffff 14%,
        rgba(255, 255, 255, 0.95) 24%,
        rgba(255, 255, 255, 0.55) 34%,
        rgba(255, 255, 255, 0.12) 44%,
        transparent 54%
      ),
      linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.3) 0%,
        transparent 20%,
        transparent 80%,
        rgba(255, 255, 255, 0.25) 100%
      );
  }

  .brand-heading {
    font-size: clamp(2.45rem, 4vw, 3.5rem);
  }

  .brand-feature-item {
    width: auto;
    max-width: none;
  }

  .login-card {
    max-width: 440px;
    --card-pad: 2.1rem 1.55rem 1.55rem;
  }
}

@media (max-width: 1180px) {
  .brand-preview {
    display: none;
  }

  .brand-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .login-shell {
    grid-template-columns: minmax(0, 1fr) minmax(min(100%, 340px), 420px);
    background-position: 72% 48%;
    background-size: 118% auto;
  }

  .login-shell::before {
    background:
      linear-gradient(
        100deg,
        #ffffff 0%,
        #ffffff 12%,
        rgba(255, 255, 255, 0.9) 22%,
        rgba(255, 255, 255, 0.35) 36%,
        transparent 50%
      );
  }

  .brand-feature-list {
    flex-wrap: wrap;
    width: 100%;
  }

  .brand-heading {
    font-size: clamp(2.1rem, 3.6vw, 2.85rem);
  }
}

/* Tablet and below: form-only — keep page bg, hide brand/laptop chrome */
@media (max-width: 1100px) {
  html,
  body.auth-body {
    overflow-x: hidden;
    overflow-y: auto;
    height: auto;
    min-height: 100%;
  }

  .login-page {
    height: auto;
    min-height: 100dvh;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    justify-content: center;
    --page-frame-x: clamp(0.85rem, 3vw, 1.25rem);
    --page-frame-y: clamp(0.75rem, 2vh, 1rem);
    padding: var(--page-frame-y) var(--page-frame-x);
    gap: 0.75rem;
  }

  /* Compact shell — same proportions as desktop card, not full-width fatty */
  .login-shell {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    row-gap: 0.75rem;
    column-gap: 0;
    --shell-gap: 0;
    padding: 0;
    width: min(100%, 440px);
    max-width: 440px;
    height: auto;
    max-height: none;
    min-height: 0;
    margin-inline: auto;
    background-image: none !important;
    background-color: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
  }

  .login-shell::before {
    content: none;
  }

  .login-shell__body {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    order: 2;
  }

  .login-shell__top {
    order: 1;
    flex: 0 0 auto;
    margin-bottom: 0.15rem;
    padding: 0.55rem 0.65rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  }

  .login-brand-panel {
    display: none !important;
  }

  .login-form-side {
    justify-content: center;
    align-items: stretch;
    align-self: stretch;
    height: auto;
    min-height: 0;
    width: 100%;
    grid-column: auto;
    grid-row: auto;
  }

  .login-form-side::before {
    display: none;
  }

  .login-card {
    max-width: 440px;
    width: 100%;
    height: auto;
    min-height: 0;
    margin-inline: auto;
    overflow: hidden;
    transform: none;
    --card-pad: 1.65rem 1.5rem 1.5rem;
    --card-radius: 22px;
    border-radius: var(--card-radius);
  }

  .form-input,
  .login-button {
    height: 52px;
  }

  .form-header {
    margin-bottom: 1.2rem;
  }

  .form-header__icon {
    width: 52px;
    height: 52px;
  }

  .login-form {
    gap: 1.1rem;
  }

  .login-secure-note {
    padding-top: 0.85rem;
    font-size: 12px;
  }

  .login-footer {
    padding-bottom: 0.35rem;
    max-width: 440px;
  }
}

@media (max-width: 640px) {
  .login-page {
    --page-frame-x: 0.75rem;
    --page-frame-y: 0.75rem;
    --page-frame: 0.75rem;
    padding: var(--page-frame-y) var(--page-frame-x);
    gap: 0.55rem;
  }

  .login-page__mesh,
  .login-page__glow,
  .brand-metrics,
  .brand-preview,
  .login-brand-panel {
    display: none !important;
  }

  .login-page::before {
    background: transparent;
  }

  .login-topbar__brand img,
  .login-logo {
    height: 40px !important;
    max-height: 40px !important;
    max-width: 180px !important;
  }

  .login-lang__btn {
    padding: 0.45rem 0.7rem;
  }

  .login-lang__label {
    display: none;
  }

  .login-shell {
    --shell-gap: 0;
    padding: 0;
    width: min(100%, 400px);
    max-width: 400px;
    background-image: none !important;
    background-color: transparent;
  }

  .login-card {
    max-width: 400px;
    padding: 1.45rem 1.25rem 1.35rem;
    border-radius: 20px;
    --card-pad: 1.45rem 1.25rem 1.35rem;
    --card-radius: 20px;
  }

  .form-header {
    margin-bottom: 1.15rem;
  }

  .form-header h1 {
    font-size: 1.45rem;
  }

  .login-form {
    gap: 1rem;
  }

  .login-button {
    margin-top: 0.5rem;
  }

  .login-footer {
    font-size: 11px;
    max-width: 100%;
  }
}

/* Very narrow phones */
@media (max-width: 380px) {
  .brand-feature-item {
    flex: 1 1 100%;
    min-width: 0;
  }

  .login-lang__menu {
    min-width: 170px;
    right: 0;
    left: auto;
  }

  [dir="rtl"] .login-lang__menu {
    right: auto;
    left: 0;
  }
}

/* Short stacked screens: allow scroll, don’t force fixed shell height */
@media (max-width: 1100px) and (max-height: 820px) {
  .login-shell {
    height: auto;
    max-height: none;
    min-height: 0;
  }

  .login-card {
    --card-pad: 1.2rem 1.1rem 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-shell__top,
  .login-shell,
  .login-form-side,
  .login-footer,
  .brand-top,
  .brand-feature-list,
  .brand-feature-item,
  .brand-footer-tagline,
  .brand-heading-accent--gradient::after,
  .brand-preview__bar,
  .login-button,
  .brand-feature,
  .form-header__icon,
  .form-header__icon::before {
    animation: none !important;
    transition: none !important;
  }

  .brand-heading-accent--gradient::after {
    transform: scaleX(1) !important;
    opacity: 1 !important;
  }

  .login-button:hover,
  .brand-feature:hover,
  .brand-feature-item:hover {
    transform: none;
  }

  .brand-feature-item:hover .brand-feature-item__icon,
  .brand-feature-item:hover .brand-feature-item__icon svg {
    transform: none;
  }
}
