/* Nexobiz Cloud — Enterprise Authentication Experience (premium split-screen) */

:root {
    --nbx-navy: #0f172a;
    --nbx-blue: #2f6bff;
    --nbx-blue-bright: #4b7dff;
    --nbx-indigo: #5b5cf0;
    --nbx-violet: #6d4cff;
    --nbx-teal: #12b886;
    --nbx-cyan: #38bdf8;
    --nbx-accent: var(--nbx-violet);
    --nbx-page: #f7f8fc;
    --nbx-surface: #ffffff;
    --nbx-text: #0f172a;
    --nbx-text-secondary: #64748b;
    --nbx-border: #e2e8f0;
    --nbx-success: #059669;
    --nbx-error: #dc2626;
    --nbx-warning: #d97706;
    --nbx-radius: 14px;
    --nbx-font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
    --nbx-primary: #6d4cff;
    --nbx-primary-hover: #2f6bff;
    --nbx-muted: #64748b;
    --nbx-surface: #ffffff;
    --nbx-transition-fast: 160ms;
    --nbx-transition-normal: 240ms;
    --nbx-transition-slow: 720ms;
    --nbx-ease: cubic-bezier(.16, 1, .3, 1);
    --nbx-ease-enter: cubic-bezier(.16, 1, .3, 1);
}

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

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

body.nbx-auth-body {
    font-family: var(--nbx-font);
    background: var(--nbx-page);
    color: var(--nbx-text);
    -webkit-font-smoothing: antialiased;
}

.nbx-auth {
    display: grid;
    min-height: 100vh;
    grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
    .nbx-auth {
        grid-template-columns: minmax(0, 58fr) minmax(0, 42fr);
    }
}

/* ── Brand panel (light premium) ── */
.nbx-auth-brand {
    position: relative;
    display: none;
    overflow: hidden;
    padding: clamp(1.75rem, 3.5vw, 3rem);
    background:
        radial-gradient(560px 440px at 92% 0%, rgba(109, 76, 255, 0.28), transparent 68%),
        radial-gradient(520px 420px at 0% 78%, rgba(47, 107, 255, 0.22), transparent 70%),
        radial-gradient(380px 300px at 72% 100%, rgba(56, 189, 248, 0.2), transparent 72%),
        linear-gradient(165deg, #ffffff 0%, #f3efff 46%, #e7f0ff 100%);
    color: var(--nbx-text);
}

@media (min-width: 1024px) {
    .nbx-auth-brand {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
}

/* v1310 — console-replaceable side wallpaper */
.nbx-auth-brand__wallpaper {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    transform: scale(1.02);
    animation: nbx-wallpaper-ken 18s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

.nbx-auth-brand__wallpaper-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(160deg, rgba(15, 23, 42, 0.55) 0%, rgba(15, 23, 42, 0.42) 45%, rgba(47, 107, 255, 0.28) 100%);
    pointer-events: none;
    z-index: 0;
}

.nbx-auth-brand--wallpaper {
    color: #f8fafc;
}

.nbx-auth-brand--wallpaper .nbx-auth-brand__glow,
.nbx-auth-brand--wallpaper .nbx-auth-brand__texture {
    opacity: 0.18;
}

.nbx-auth-brand--wallpaper .nbx-auth-brand__name,
.nbx-auth-brand--wallpaper .nbx-auth-brand__headline,
.nbx-auth-brand--wallpaper .nbx-auth-brand__lead,
.nbx-auth-brand--wallpaper .nbx-auth-highlights strong,
.nbx-auth-brand--wallpaper .nbx-auth-highlights span,
.nbx-auth-brand--wallpaper .nbx-auth-trustbar__label {
    color: #f8fafc;
}

.nbx-auth-brand--wallpaper .nbx-auth-brand__lead,
.nbx-auth-brand--wallpaper .nbx-auth-highlights span,
.nbx-auth-brand--wallpaper .nbx-auth-trustbar__label {
    color: rgba(248, 250, 252, 0.82);
}

.nbx-auth-brand--wallpaper .nbx-auth-brand__accent {
    color: #93c5fd;
}

.nbx-auth-brand--wallpaper .nbx-auth-trustbar__logo {
    filter: brightness(0) invert(1);
    opacity: 0.85;
}

@keyframes nbx-wallpaper-ken {
    from { transform: scale(1.02) translate3d(0, 0, 0); }
    to { transform: scale(1.08) translate3d(-1.5%, -1%, 0); }
}

.nbx-auth-brand__glow {
    position: absolute;
    border-radius: 999px;
    filter: blur(42px);
    pointer-events: none;
    opacity: 1;
    z-index: 0;
}

.nbx-auth-brand__glow--blue {
    width: 460px;
    height: 460px;
    top: -120px;
    right: -40px;
    background: rgba(47, 107, 255, 0.34);
    animation: nbx-orb-a 20s ease-in-out infinite alternate;
}

.nbx-auth-brand__glow--violet {
    width: 520px;
    height: 520px;
    top: 18%;
    left: -160px;
    background: rgba(109, 76, 255, 0.3);
    animation: nbx-orb-b 22s ease-in-out infinite alternate;
}

.nbx-auth-brand__glow--teal {
    width: 340px;
    height: 340px;
    bottom: -40px;
    right: 6%;
    background: rgba(18, 184, 134, 0.22);
    animation: nbx-orb-c 20s ease-in-out infinite alternate;
}

.nbx-auth-brand__glow--cyan {
    width: 300px;
    height: 300px;
    top: 8%;
    right: 18%;
    background: rgba(56, 189, 248, 0.28);
    animation: nbx-orb-d 18s ease-in-out infinite alternate;
}

.nbx-auth-brand__ambient {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    transform: translate3d(calc(var(--nbx-px, 0) * 12px), calc(var(--nbx-py, 0) * 8px), 0);
}

.nbx-auth-brand__texture {
    position: absolute;
    inset: 0;
    opacity: 0.45;
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: radial-gradient(ellipse 80% 70% at 40% 30%, #000 10%, transparent 75%);
    pointer-events: none;
    z-index: 0;
}

.nbx-auth-brand__inner {
    position: relative;
    z-index: 1;
    max-width: 40rem;
}

.nbx-auth-brand__lockup {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    color: var(--nbx-text);
}

.nbx-auth-brand__mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #6d4cff, #2f6bff);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(47, 107, 255, 0.25);
}

.nbx-auth-brand__mark--soft {
    background: linear-gradient(145deg, rgba(109, 76, 255, 0.12), rgba(47, 107, 255, 0.12));
    color: var(--nbx-violet);
    box-shadow: none;
    border: 1px solid rgba(109, 76, 255, 0.18);
}

.nbx-auth-brand__name {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    line-height: 1.15;
}

.nbx-auth-brand__name strong {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.nbx-auth-brand__name span {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--nbx-text-secondary);
}

.nbx-auth-brand__headline {
    margin: 1.75rem 0 0;
    font-size: clamp(2rem, 3.4vw, 2.85rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.035em;
    color: var(--nbx-navy);
    max-width: 16ch;
}

.nbx-auth-brand__accent {
    background: linear-gradient(110deg, #6d4cff 0%, #2f6bff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nbx-auth-brand__lead {
    margin: 1rem 0 0;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--nbx-text-secondary);
    max-width: 42ch;
}

.nbx-auth-highlights {
    position: relative;
    z-index: 1;
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.85rem;
}

.nbx-auth-highlights li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    align-items: start;
}

.nbx-auth-highlights__icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.nbx-auth-highlights__icon--violet {
    background: rgba(109, 76, 255, 0.12);
    color: #6d4cff;
}

.nbx-auth-highlights__icon--teal {
    background: rgba(18, 184, 134, 0.12);
    color: #0f9f74;
}

.nbx-auth-highlights__icon--blue {
    background: rgba(47, 107, 255, 0.12);
    color: #2f6bff;
}

.nbx-auth-highlights strong {
    display: block;
    font-size: 0.84rem;
    font-weight: 650;
    color: var(--nbx-navy);
    margin-bottom: 0.12rem;
}

.nbx-auth-highlights span {
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--nbx-text-secondary);
}

.nbx-auth-brand__viz {
    position: relative;
    z-index: 1;
    margin: 1.75rem 0 0;
    max-width: 520px;
}

/* Dashboard product preview */
.nbx-auth-dash {
    position: relative;
    padding: 0.35rem 0.5rem 1.25rem;
}

.nbx-auth-dash::before {
    content: "";
    position: absolute;
    inset: 8% 4% 4%;
    z-index: 0;
    border-radius: 24px;
    background: radial-gradient(circle at 50% 40%, rgba(109, 76, 255, 0.28), rgba(47, 107, 255, 0.08) 55%, transparent 72%);
    filter: blur(8px);
    pointer-events: none;
}

.nbx-auth-dash__shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 118px 1fr;
    min-height: 280px;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(109, 76, 255, 0.16);
    box-shadow:
        0 24px 50px rgba(79, 70, 229, 0.16),
        0 2px 0 rgba(255, 255, 255, 0.7) inset;
    transform: perspective(1200px) rotateX(2deg) rotateY(-4deg);
}

.nbx-auth-dash__nav {
    background: linear-gradient(180deg, #111827 0%, #0b1220 100%);
    color: #cbd5e1;
    padding: 0.85rem 0.7rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.nbx-auth-dash__nav-brand {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
}

.nbx-auth-dash__nav-mark {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    font-size: 0.62rem;
    background: linear-gradient(145deg, #6d4cff, #2f6bff);
}

.nbx-auth-dash__nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.28rem;
}

.nbx-auth-dash__nav li {
    font-size: 0.62rem;
    padding: 0.35rem 0.45rem;
    border-radius: 7px;
    color: #94a3b8;
}

.nbx-auth-dash__nav li.is-active {
    background: rgba(79, 112, 255, 0.22);
    color: #fff;
}

.nbx-auth-dash__ai {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.58rem;
    color: #a5b4fc;
}

.nbx-auth-dash__ai-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5);
    animation: nbx-ai-pulse 2s ease-in-out infinite;
}

@keyframes nbx-ai-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.45); }
    50% { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
}

.nbx-auth-dash__main {
    padding: 0.85rem;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.nbx-auth-dash__top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.65rem;
}

.nbx-auth-dash__top strong {
    font-size: 0.78rem;
    color: var(--nbx-navy);
}

.nbx-auth-dash__top span {
    font-size: 0.58rem;
    color: var(--nbx-text-secondary);
}

.nbx-auth-dash__metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.nbx-auth-dash__metrics article {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.55rem 0.65rem;
}

.nbx-auth-dash__metrics span {
    display: block;
    font-size: 0.58rem;
    color: var(--nbx-text-secondary);
}

.nbx-auth-dash__metrics strong {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.95rem;
    color: var(--nbx-navy);
}

.nbx-auth-dash__metrics em {
    font-style: normal;
    font-size: 0.58rem;
    font-weight: 650;
    color: #059669;
}

.nbx-auth-dash__grid {
    display: grid;
    grid-template-columns: 1.2fr 0.9fr;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.nbx-auth-dash__chart,
.nbx-auth-dash__progress,
.nbx-auth-dash__bottom section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.55rem 0.65rem;
}

.nbx-auth-dash__chart header,
.nbx-auth-dash__progress header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.35rem;
}

.nbx-auth-dash__chart strong,
.nbx-auth-dash__progress strong,
.nbx-auth-dash__bottom strong {
    font-size: 0.66rem;
    color: var(--nbx-navy);
}

.nbx-auth-dash__chart span {
    font-size: 0.56rem;
    color: var(--nbx-text-secondary);
}

.nbx-auth-dash__chart svg {
    width: 100%;
    height: 56px;
    display: block;
}

.nbx-auth-dash__line {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: nbx-draw 1.6s ease forwards 0.35s;
}

.nbx-auth-dash__fill {
    opacity: 0;
    animation: nbx-fade 1.1s ease forwards 0.7s;
}

.nbx-auth-dash__bar {
    display: grid;
    gap: 0.18rem;
    margin-top: 0.4rem;
}

.nbx-auth-dash__bar em {
    font-style: normal;
    font-size: 0.56rem;
    color: var(--nbx-text-secondary);
}

.nbx-auth-dash__bar span {
    display: block;
    height: 6px;
    border-radius: 999px;
    background: #e2e8f0;
    position: relative;
    overflow: hidden;
}

.nbx-auth-dash__bar span::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--p, 50%);
    border-radius: inherit;
    background: linear-gradient(90deg, #6d4cff, #2f6bff);
    transform: scaleX(0);
    transform-origin: left center;
    animation: nbx-bar 1.15s ease forwards;
}

.nbx-auth-dash__bar:nth-child(2) span::after { animation-delay: 0.15s; }
.nbx-auth-dash__bar:nth-child(3) span::after { animation-delay: 0.28s; }
.nbx-auth-dash__bar:nth-child(4) span::after { animation-delay: 0.4s; }

.nbx-auth-dash__bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.nbx-auth-dash__bottom ul {
    list-style: none;
    margin: 0.35rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.25rem;
}

.nbx-auth-dash__bottom li {
    font-size: 0.56rem;
    color: var(--nbx-text-secondary);
}

.nbx-auth-dash__float {
    position: absolute;
    z-index: 2;
    min-width: 132px;
    padding: 0.55rem 0.7rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    animation: nbx-float 6.5s ease-in-out infinite;
}

.nbx-auth-dash__float-shift {
    transform: translate3d(calc(var(--nbx-px, 0) * 16px), calc(var(--nbx-py, 0) * 12px), 0);
}

.nbx-auth-dash__float span {
    display: block;
    font-size: 0.58rem;
    color: var(--nbx-text-secondary);
}

.nbx-auth-dash__float strong {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.72rem;
    color: var(--nbx-navy);
}

.nbx-auth-dash__float--a {
    top: 12%;
    right: -0.35rem;
}

.nbx-auth-dash__float--b {
    bottom: 8%;
    left: -0.15rem;
    animation-delay: 0.8s;
}

@keyframes nbx-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.nbx-auth-trustbar {
    position: relative;
    z-index: 1;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.nbx-auth-trustbar__label {
    margin: 0 0 0.65rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--nbx-text-secondary);
}

.nbx-auth-trustbar__logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.35rem;
}

.nbx-auth-trustbar__logo {
    display: block;
    height: 22px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    opacity: 0.72;
    filter: grayscale(1);
}

.nbx-auth-trustbar__logo:hover {
    opacity: 0.92;
}

/* ── Login panel ── */
.nbx-auth-panel {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 1rem clamp(1rem, 3vw, 2.25rem) 1.25rem;
    background:
        radial-gradient(420px 280px at 80% 0%, rgba(109, 76, 255, 0.08), transparent 70%),
        linear-gradient(180deg, #f4f6fb 0%, #ffffff 42%);
}

.nbx-auth-panel__mobile-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 1024px) {
    .nbx-auth-panel__mobile-brand { display: none; }
}

.nbx-auth-panel__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 2rem;
    margin-bottom: 0.5rem;
}

.nbx-auth-panel__workspace {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 36px;
}

.nbx-auth-panel__workspace strong {
    display: block;
    font-size: 0.875rem;
    color: var(--nbx-text);
}

.nbx-auth-panel__workspace span {
    display: block;
    font-size: 0.72rem;
    color: var(--nbx-text-secondary);
}

.nbx-auth-panel__help {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--nbx-text-secondary);
    text-decoration: none;
}

.nbx-auth-panel__help:hover { color: var(--nbx-blue); }

.nbx-auth-panel__top-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nbx-auth-locale {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.nbx-auth-locale__label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--nbx-text-secondary);
}

.nbx-auth-locale__options {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0.15rem;
    border: 1px solid var(--nbx-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
}

.nbx-auth-locale__option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.65rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--nbx-text-secondary);
    text-decoration: none;
    line-height: 1;
}

.nbx-auth-locale__option:hover {
    color: var(--nbx-blue);
}

.nbx-auth-locale__option.is-active {
    background: var(--nbx-blue);
    color: #fff;
}

.nbx-auth-tenant-logo {
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--nbx-border);
}

.nbx-auth-panel__main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.nbx-auth-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border: 1px solid #e6ebf5;
    border-radius: 22px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.06);
    padding: 1.7rem 1.55rem 1.35rem;
}

.nbx-auth-card__title {
    margin: 0;
    font-size: clamp(1.7rem, 3.5vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--nbx-text);
}

.nbx-auth-card__desc {
    margin: 0.45rem 0 0;
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--nbx-text-secondary);
}

.nbx-auth-powered {
    margin: 0.55rem 0 0;
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
}

/* Alerts */
.nbx-auth-alert {
    margin-top: 1.15rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    font-size: 0.875rem;
    line-height: 1.5;
}

.nbx-auth-alert p { margin: 0; }
.nbx-auth-alert p + p { margin-top: 0.35rem; }

.nbx-auth-alert--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.nbx-auth-alert--success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.nbx-auth-alert--warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.nbx-auth-alert--info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

/* SSO */
.nbx-auth-sso { margin-top: 0.25rem; }

.nbx-auth-sso__stack {
    display: grid;
    gap: 0.65rem;
}

.nbx-auth-sso__stack--row {
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 420px) {
    .nbx-auth-sso__stack--row { grid-template-columns: 1fr; }
}

.nbx-auth-oauth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 48px;
    padding: 0.65rem 0.85rem;
    border-radius: 12px;
    border: 1px solid var(--nbx-border);
    background: #fff;
    color: var(--nbx-text);
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.nbx-auth-oauth:hover {
    border-color: #cbd5e1;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    transform: translateY(-1px);
}

.nbx-auth-oauth:focus-visible {
    outline: 2px solid var(--nbx-blue-bright);
    outline-offset: 2px;
}

.nbx-auth-oauth--primary {
    background: linear-gradient(135deg, var(--nbx-violet) 0%, var(--nbx-blue) 100%);
    border-color: transparent;
    color: #fff;
}

.nbx-auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.15rem 0;
    color: var(--nbx-text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}

.nbx-auth-divider::before,
.nbx-auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--nbx-border);
}

/* Workspace hints */
.nbx-auth-workspace {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: #f5f7ff;
    border: 1px solid #d7dff9;
}

.nbx-auth-workspace[hidden] { display: none !important; }

.nbx-auth-workspace__lead {
    margin: 0 0 0.65rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1e3a8a;
}

.nbx-auth-workspace__item {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.65rem 0;
    border-top: 1px solid rgba(22, 73, 216, 0.12);
}

.nbx-auth-workspace__item:first-of-type { border-top: none; padding-top: 0; }

.nbx-auth-workspace__org {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--nbx-text);
}

.nbx-auth-workspace__url {
    font-size: 0.75rem;
    color: var(--nbx-text-secondary);
}

.nbx-auth-workspace__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0.45rem 0.85rem;
    border-radius: 10px;
    border: 1px solid var(--nbx-border);
    background: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--nbx-text);
    text-decoration: none;
}

.nbx-auth-workspace__btn:hover {
    border-color: var(--nbx-blue);
    color: var(--nbx-blue);
}

/* Form */
.nbx-auth-form {
    margin-top: 1.35rem;
    display: grid;
    gap: 1rem;
}

.nbx-auth-field {
    display: grid;
    gap: 0.4rem;
}

.nbx-auth-field > span:first-child:not(.nbx-auth-input-wrap) {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--nbx-text);
    transition: color 0.2s ease;
}

.nbx-auth-field:focus-within > span:first-child {
    color: var(--nbx-violet);
}

.nbx-auth-valid {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    color: #059669;
    opacity: 0;
    transform: scale(0.86);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nbx-auth-field.is-valid .nbx-auth-valid {
    opacity: 1;
    transform: scale(1);
}

.nbx-auth-toggle-pw svg {
    transition: transform 0.22s ease;
}

.nbx-auth-toggle-pw.is-toggling svg {
    transform: scale(0.88) rotate(-8deg);
}

.nbx-auth-input-wrap {
    position: relative;
}

.nbx-auth-input {
    width: 100%;
    min-height: 50px;
    padding: 0.7rem 0.9rem;
    border-radius: 12px;
    border: 1px solid var(--nbx-border);
    background: #fff;
    font: inherit;
    font-size: 0.9375rem;
    color: var(--nbx-text);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.nbx-auth-input-wrap .nbx-auth-input { padding-right: 2.75rem; }

.nbx-auth-input::placeholder { color: #94a3b8; }

.nbx-auth-input:hover { border-color: #cbd5e1; }

.nbx-auth-input:focus {
    outline: none;
    border-color: var(--nbx-violet);
    box-shadow: 0 0 0 3px rgba(109, 76, 255, 0.14);
}

.nbx-auth-input:disabled {
    background: #f8fafc;
    color: #94a3b8;
    cursor: not-allowed;
}

.nbx-auth-input--error {
    border-color: var(--nbx-error);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.nbx-auth-toggle-pw {
    position: absolute;
    right: 0.45rem;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--nbx-text-secondary);
    cursor: pointer;
    display: grid;
    place-items: center;
}

.nbx-auth-toggle-pw:hover { background: #f1f5f9; color: var(--nbx-text); }

.nbx-auth-toggle-pw:focus-visible {
    outline: 2px solid var(--nbx-blue-bright);
    outline-offset: 1px;
}

.nbx-auth-field-hint {
    font-size: 0.75rem;
    color: var(--nbx-warning);
    min-height: 1rem;
}

.nbx-auth-field-hint:empty { display: none; }

.nbx-auth-form__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.nbx-auth-trust {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8125rem;
    color: var(--nbx-text-secondary);
    cursor: pointer;
}

.nbx-auth-trust input {
    width: 16px;
    height: 16px;
    accent-color: var(--nbx-violet);
}

.nbx-auth-link {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--nbx-blue);
    text-decoration: none;
}

.nbx-auth-link:hover { text-decoration: underline; }

.nbx-auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    min-height: 50px;
    margin-top: 0.15rem;
    padding: 0.8rem 1.25rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--nbx-violet) 0%, var(--nbx-blue) 100%);
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.22);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 650;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.nbx-auth-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(79, 70, 229, 0.28);
}

.nbx-auth-submit:active:not(:disabled) { transform: scale(0.985); }

.nbx-auth-submit__arrow {
    display: inline-flex;
    transition: transform 0.22s ease;
}

.nbx-auth-submit:hover:not(:disabled) .nbx-auth-submit__arrow {
    transform: translateX(5px);
}

.nbx-auth-submit:focus-visible {
    outline: 2px solid var(--nbx-indigo);
    outline-offset: 2px;
}

.nbx-auth-submit:disabled {
    opacity: 0.72;
    cursor: not-allowed;
}

.nbx-auth-submit__spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: nbx-spin 0.7s linear infinite;
}

@keyframes nbx-spin { to { transform: rotate(360deg); } }

.nbx-auth-security {
    display: grid;
    justify-items: center;
    gap: 0.2rem;
    margin: 1.15rem 0 0;
    font-size: 0.72rem;
    line-height: 1.5;
    text-align: center;
    color: #94a3b8;
    cursor: default;
    outline: none;
}

.nbx-auth-security__row {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.4rem;
    max-width: 36rem;
}

.nbx-auth-security__icon {
    display: inline-flex;
    margin-top: 0.12rem;
    color: #64748b;
    transition: color 0.2s ease;
}

.nbx-auth-security__detail {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    font-size: 0.68rem;
    letter-spacing: 0.01em;
    color: #64748b;
    transition: max-height 0.35s ease, opacity 0.35s ease;
}

.nbx-auth-security:hover .nbx-auth-security__detail,
.nbx-auth-security:focus-visible .nbx-auth-security__detail,
.nbx-auth-security:focus .nbx-auth-security__detail {
    max-height: 2.5rem;
    opacity: 1;
}

.nbx-auth-security:hover .nbx-auth-security__icon,
.nbx-auth-security:focus-visible .nbx-auth-security__icon {
    color: var(--nbx-violet);
}

.nbx-auth-foot {
    margin: 1.15rem 0 0;
    font-size: 0.8125rem;
    text-align: center;
    color: var(--nbx-text-secondary);
}

.nbx-auth-foot--muted {
    margin-top: 0.65rem;
    font-size: 0.75rem;
}

.nbx-auth-security-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem 1rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--nbx-border);
    font-size: 0.6875rem;
    color: var(--nbx-text-secondary);
}

/* Footer */
.nbx-auth-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem 1.15rem;
    margin-top: 1.35rem;
    padding-top: 0.85rem;
    font-size: 0.72rem;
    color: var(--nbx-text-secondary);
}

.nbx-auth-footer a {
    color: var(--nbx-text-secondary);
    text-decoration: none;
}

.nbx-auth-footer a:hover {
    color: var(--nbx-blue);
    text-decoration: underline;
}

.nbx-auth-mobile-support {
    display: none;
    position: sticky;
    bottom: 0.75rem;
    margin: 0.75rem auto 0;
    width: fit-content;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--nbx-border);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    color: var(--nbx-text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
}

@media (max-width: 1023px) {
    .nbx-auth-mobile-support { display: inline-flex; }
}

/* Workspace select */
.nbx-auth-workspace-list {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0 0;
    display: grid;
    gap: 0.65rem;
}

.nbx-auth-workspace-card {
    display: grid;
    gap: 0.25rem;
    width: 100%;
    text-align: left;
    padding: 1rem 1.1rem;
    border-radius: 12px;
    border: 1px solid var(--nbx-border);
    background: #fff;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.nbx-auth-workspace-card:hover {
    border-color: var(--nbx-blue-bright);
    box-shadow: 0 4px 16px rgba(22, 73, 216, 0.08);
}

.nbx-auth-workspace-card strong {
    font-size: 0.9375rem;
    color: var(--nbx-text);
}

.nbx-auth-workspace-card span {
    font-size: 0.8125rem;
    color: var(--nbx-text-secondary);
}

/* Entrance animations */
.nbx-auth-enter {
    animation: nbx-enter 0.55s ease both;
}

.nbx-auth-enter--d1 { animation-delay: 0.08s; }
.nbx-auth-enter--d2 { animation-delay: 0.16s; }
.nbx-auth-enter--d3 { animation-delay: 0.24s; }

@keyframes nbx-enter {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* v1310 — animated login form */
.nbx-auth-panel {
    position: relative;
    overflow: hidden;
}

.nbx-auth-card--animated {
    position: relative;
}

.nbx-auth-card--animated::before {
    content: "";
    position: absolute;
    inset: -18% -12% auto;
    height: 52%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(109, 76, 255, 0.12), transparent 68%);
    pointer-events: none;
    animation: nbx-form-glow 5.5s ease-in-out infinite alternate;
    z-index: 0;
}

.nbx-auth-card--animated > * {
    position: relative;
    z-index: 1;
}

.nbx-auth-form-step {
    animation: nbx-form-rise 0.58s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.nbx-auth-form-step--1 { animation-delay: 0.04s; }
.nbx-auth-form-step--2 { animation-delay: 0.11s; }
.nbx-auth-form-step--3 { animation-delay: 0.18s; }
.nbx-auth-form-step--4 { animation-delay: 0.26s; }
.nbx-auth-form-step--5 { animation-delay: 0.34s; }
.nbx-auth-form-step--6 { animation-delay: 0.42s; }
.nbx-auth-form-step--7 { animation-delay: 0.50s; }
.nbx-auth-form-step--8 { animation-delay: 0.58s; }
.nbx-auth-form-step--9 { animation-delay: 0.66s; }
.nbx-auth-form-step--10 { animation-delay: 0.74s; }

@keyframes nbx-form-rise {
    from { opacity: 0; transform: translate3d(18px, 14px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes nbx-form-glow {
    from { opacity: 0.55; transform: translate3d(0, 0, 0) scale(1); }
    to { opacity: 1; transform: translate3d(4%, 6%, 0) scale(1.08); }
}

.nbx-auth-form--animated .nbx-auth-input:focus {
    animation: nbx-input-focus 0.35s ease;
}

@keyframes nbx-input-focus {
    from { box-shadow: 0 0 0 0 rgba(109, 76, 255, 0); }
    to { box-shadow: 0 0 0 3px rgba(109, 76, 255, 0.14); }
}

@media (prefers-reduced-motion: reduce) {
    .nbx-auth-enter,
    .nbx-auth-dash__float,
    .nbx-auth-dash__ai-dot,
    .nbx-auth-form-step,
    .nbx-auth-brand__wallpaper,
    .nbx-auth-brand__glow,
    .nbx-auth-card--animated::before,
    .nbx-auth-dash__line,
    .nbx-auth-dash__fill,
    .nbx-auth-dash__bar span::after,
    .nbx-auth-live-dot,
    .nbx-auth-form--animated .nbx-auth-input:focus { animation: none; }

    .nbx-auth-form-step {
        animation: nbx-fade-only 0.2s ease both;
    }

    .nbx-auth-dash__line { stroke-dashoffset: 0; }
    .nbx-auth-dash__fill { opacity: 1; }
    .nbx-auth-dash__bar span::after { transform: none; }
    .nbx-auth-brand__ambient,
    .nbx-auth-living-stage,
    .nbx-auth-dash__float-shift { transform: none; }
}

@keyframes nbx-fade-only {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes nbx-orb-a {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(16px, 10px, 0); }
}

@keyframes nbx-orb-b {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(12px, -14px, 0); }
}

@keyframes nbx-orb-c {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(-14px, 8px, 0); }
}

@keyframes nbx-orb-d {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(-10px, 12px, 0); }
}

@keyframes nbx-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes nbx-fade {
    to { opacity: 1; }
}

@keyframes nbx-bar {
    to { transform: scaleX(1); }
}

.nbx-auth-living-stage {
    transform: translate3d(calc(var(--nbx-px, 0) * 8px), calc(var(--nbx-py, 0) * 6px), 0);
}

.nbx-auth-live-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 0.28rem;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    vertical-align: 1px;
    animation: nbx-live 4.8s ease-in-out infinite;
}

@keyframes nbx-live {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.35); }
    50% { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0); }
}

@media (max-width: 1023px) {
    .nbx-auth-brand {
        display: flex;
        min-height: 0;
        padding: 1.25rem 1.15rem 0.15rem;
    }

    .nbx-auth-highlights,
    .nbx-auth-trustbar,
    .nbx-auth-brand__lead,
    .nbx-auth-dash__float {
        display: none;
    }

    .nbx-auth-brand__headline {
        font-size: 1.4rem;
    }

    .nbx-auth-panel {
        min-height: 0;
    }
}

@media (max-width: 719px) {
    .nbx-auth-brand {
        display: flex;
        padding: 1.1rem 1rem 0;
    }

    .nbx-auth-brand__viz,
    .nbx-auth-trustbar,
    .nbx-auth-highlights,
    .nbx-auth-brand__lead {
        display: none;
    }

    .nbx-auth-brand__headline {
        font-size: 1.35rem;
        max-width: none;
    }
}

.nbx-rise {
    animation: nbx-rise var(--nbx-transition-slow) var(--nbx-ease-enter) both;
    animation-delay: var(--d, 0ms);
}

.nbx-auth-brand__headline .nbx-rise {
    display: inline;
}

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

.nbx-auth-card--reference {
    max-width: 440px;
    animation: nbx-card-in .72s var(--nbx-ease-enter) .5s both;
}

@keyframes nbx-card-in {
    from { opacity: 0; transform: translateY(24px) scale(.97); }
    to { opacity: 1; transform: none; }
}

.nbx-auth-card.is-leaving {
    animation: nbx-card-out .35s ease forwards;
}

@keyframes nbx-card-out {
    to { opacity: 0; transform: translateY(10px) scale(.985); }
}

.nbx-auth-card.is-shake {
    animation: nbx-shake .36s ease;
}

@keyframes nbx-shake {
    0%, 100% { transform: translateX(0); }
    30% { transform: translateX(-4px); }
    60% { transform: translateX(4px); }
    80% { transform: translateX(-2px); }
}

.nbx-auth-float .nbx-auth-input {
    padding-top: 1.2rem;
    padding-bottom: 0.4rem;
}

.nbx-auth-float__label {
    position: absolute;
    left: 0.9rem;
    top: 0.95rem;
    z-index: 1;
    color: #94a3b8;
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1;
    pointer-events: none;
    transition: transform var(--nbx-transition-normal) var(--nbx-ease), font-size var(--nbx-transition-normal) var(--nbx-ease), color var(--nbx-transition-fast) ease;
}

.nbx-auth-float input:focus ~ .nbx-auth-float__label,
.nbx-auth-float input:not(:placeholder-shown) ~ .nbx-auth-float__label {
    transform: translateY(-0.7rem);
    font-size: 0.68rem;
    font-weight: 650;
    color: var(--nbx-primary);
}

.nbx-auth-float .nbx-auth-valid {
    right: 0.85rem;
}

.nbx-auth-toggle-pw {
    z-index: 2;
}

.nbx-auth-trust input {
    transition: transform var(--nbx-transition-fast) var(--nbx-ease);
}

.nbx-auth-trust input:active {
    transform: scale(.92);
}

.nbx-auth-submit.is-loading,
.nbx-auth-submit.is-success {
    opacity: 1;
}

.nbx-auth-submit.is-success {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.nbx-auth-submit__check {
    font-size: 1rem;
    line-height: 1;
}

.nbx-auth-oauth.is-loading {
    opacity: 0.72;
    pointer-events: none;
}

.nbx-auth-dash__metrics,
.nbx-auth-dash__grid,
.nbx-auth-dash__bottom,
.nbx-auth-dash__float {
    animation: nbx-rise .6s var(--nbx-ease-enter) both;
}

.nbx-auth-dash__metrics { animation-delay: 1.05s; }
.nbx-auth-dash__grid { animation-delay: 1.2s; }
.nbx-auth-dash__bottom { animation-delay: 1.4s; }
.nbx-auth-dash__float--a { animation-delay: 1.55s; }
.nbx-auth-dash__float--b { animation-delay: 1.7s; }

@media (prefers-reduced-motion: reduce) {
    .nbx-rise,
    .nbx-auth-card--reference,
    .nbx-auth-dash__metrics,
    .nbx-auth-dash__grid,
    .nbx-auth-dash__bottom,
    .nbx-auth-dash__float,
    .nbx-auth-card.is-shake,
    .nbx-auth-card.is-leaving {
        animation: none;
    }
}

/* Fit the sign-in screen so the footer links stay visible. */
@media (min-width: 1024px) {
    html,
    body.nbx-auth-body {
        height: 100%;
        overflow: hidden;
    }

    .nbx-auth {
        height: 100dvh;
        max-height: 100dvh;
        min-height: 0;
        overflow: hidden;
    }

    .nbx-auth-brand,
    .nbx-auth-panel {
        height: 100%;
        max-height: 100dvh;
        min-height: 0;
    }

    .nbx-auth-brand {
        padding: clamp(0.85rem, 1.8vh, 1.75rem) clamp(1.15rem, 2.2vw, 2.4rem);
    }

    .nbx-auth-brand__inner {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        min-height: 0;
    }

    .nbx-auth-brand__headline {
        margin-top: clamp(0.55rem, 1.4vh, 1.15rem);
        font-size: clamp(1.65rem, 2.5vw, 2.45rem);
    }

    .nbx-auth-brand__lead {
        margin-top: 0.45rem;
        font-size: 0.88rem;
        line-height: 1.45;
    }

    .nbx-auth-highlights {
        margin-top: clamp(0.55rem, 1.2vh, 0.9rem);
        gap: 0.4rem;
    }

    .nbx-auth-brand__viz {
        flex: 1 1 auto;
        min-height: 0;
        margin-top: clamp(0.45rem, 1.2vh, 0.9rem);
        overflow: hidden;
    }

    .nbx-auth-dash {
        height: 100%;
        padding-bottom: 0.35rem;
    }

    .nbx-auth-dash__shell {
        min-height: 0;
        max-height: 100%;
    }

    .nbx-auth-trustbar {
        flex-shrink: 0;
        margin-top: 0.55rem;
        padding-top: 0.55rem;
    }

    .nbx-auth-panel {
        padding-top: 0.7rem;
        padding-bottom: 0.55rem;
    }

    .nbx-auth-panel__main {
        flex: 1 1 auto;
        min-height: 0;
    }

    .nbx-auth-card {
        padding: 1.15rem 1.35rem 0.95rem;
    }

    .nbx-auth-form {
        margin-top: 0.85rem;
        gap: 0.7rem;
    }

    .nbx-auth-divider {
        margin: 0.7rem 0;
    }

    .nbx-auth-footer {
        flex-shrink: 0;
        margin-top: 0.35rem;
        padding-top: 0.35rem;
    }
}

@media (min-width: 1024px) and (max-height: 820px) {
    .nbx-auth-input,
    .nbx-auth-submit,
    .nbx-auth-oauth {
        min-height: 42px;
    }

    .nbx-auth-security {
        margin-top: 0.55rem;
    }
}
