/* 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;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    overflow-x: clip;
}

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;
    min-height: 100dvh;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
}

@media (min-width: 1024px) {
    .nbx-auth {
        grid-template-columns: minmax(0, 1.15fr) minmax(22rem, 0.85fr);
    }
}

@media (min-width: 1280px) {
    .nbx-auth {
        grid-template-columns: minmax(0, 58fr) minmax(0, 42fr);
    }
}

/* ── Brand panel (light premium) ── */
.nbx-auth-brand {
    position: relative;
    display: none;
    overflow: hidden;
    min-width: 0;
    padding: clamp(1.75rem, 3.5vw, 3rem);
    background:
        linear-gradient(160deg, #ffffff 0%, #f7f5ff 42%, #eef5ff 100%);
    color: var(--nbx-text);
}

@media (min-width: 1024px) {
    .nbx-auth-brand {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
}

.nbx-auth-brand__glow {
    position: absolute;
    border-radius: 999px;
    filter: blur(48px);
    pointer-events: none;
    opacity: 0.55;
}

.nbx-auth-brand__glow--blue {
    width: 280px;
    height: 280px;
    top: -60px;
    right: 8%;
    background: rgba(47, 107, 255, 0.22);
}

.nbx-auth-brand__glow--violet {
    width: 320px;
    height: 320px;
    top: 28%;
    left: -80px;
    background: rgba(109, 76, 255, 0.18);
}

.nbx-auth-brand__glow--teal {
    width: 220px;
    height: 220px;
    bottom: 8%;
    right: 12%;
    background: rgba(18, 184, 134, 0.14);
}

.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;
}

.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__shell {
    display: grid;
    grid-template-columns: 118px 1fr;
    min-height: 280px;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow:
        0 18px 50px rgba(15, 23, 42, 0.1),
        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__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);
}

.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 4.5s ease-in-out infinite;
}

.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(-6px); }
}

.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-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
    padding:
        max(0.85rem, env(safe-area-inset-top, 0px))
        max(1rem, env(safe-area-inset-right, 0px))
        max(1rem, env(safe-area-inset-bottom, 0px))
        max(1rem, env(safe-area-inset-left, 0px));
    background: #fff;
}

@media (min-width: 640px) {
    .nbx-auth-panel {
        padding:
            max(1rem, env(safe-area-inset-top, 0px))
            clamp(1.25rem, 3vw, 2.25rem)
            max(1.25rem, env(safe-area-inset-bottom, 0px));
    }
}

.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: min(440px, 100%);
    min-width: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0.25rem 0 0;
}

.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 4px 14px rgba(15, 23, 42, 0.05);
}

.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 {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--nbx-text);
}

.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;
    /* 16px on small screens avoids iOS input zoom */
    font-size: 1rem;
    color: var(--nbx-text);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

@media (min-width: 1024px) {
    .nbx-auth-input { font-size: 0.9375rem; }
}

.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: translateY(0); }

.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 {
    margin: 1.15rem 0 0;
    font-size: 0.72rem;
    line-height: 1.5;
    text-align: center;
    color: #94a3b8;
}

.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); }
}

@media (prefers-reduced-motion: reduce) {
    .nbx-auth-enter,
    .nbx-auth-dash__float,
    .nbx-auth-dash__ai-dot { animation: none; }
}

/* ── Responsive polish: phone / tablet / compact laptop ── */
.nbx-auth-brand,
.nbx-auth-panel__main {
    min-width: 0;
}

@media (max-width: 1023px) {
    .nbx-auth-panel__top {
        align-items: flex-start;
        gap: 0.65rem;
        margin-bottom: 0.85rem;
    }

    .nbx-auth-panel__workspace {
        flex: 1 1 auto;
        min-width: 0;
    }

    .nbx-auth-panel__workspace strong,
    .nbx-auth-panel__workspace span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 14rem;
    }

    .nbx-auth-panel__top-actions {
        flex: 0 0 auto;
        gap: 0.5rem;
    }

    .nbx-auth-panel__main {
        align-items: flex-start;
        padding-top: 0.35rem;
    }

    .nbx-auth-card__title {
        font-size: clamp(1.45rem, 6.5vw, 1.85rem);
    }

    .nbx-auth-card__desc {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .nbx-auth-security-strip {
        gap: 0.45rem 0.75rem;
        font-size: 0.65rem;
    }

    .nbx-auth-footer {
        gap: 0.5rem 0.85rem;
    }

    .nbx-auth-mobile-support {
        bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 640px) {
    .nbx-auth-locale__label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .nbx-auth-locale {
        gap: 0;
    }

    .nbx-auth-panel__mobile-brand {
        margin-bottom: 0.85rem;
    }

    .nbx-auth-brand__name strong {
        font-size: 0.95rem;
    }

    .nbx-auth-form {
        margin-top: 1.1rem;
        gap: 0.85rem;
    }

    .nbx-auth-input,
    .nbx-auth-submit {
        min-height: 48px;
    }

    .nbx-auth-form__row {
        gap: 0.5rem 0.75rem;
    }

    .nbx-auth-security {
        font-size: 0.68rem;
        line-height: 1.45;
    }
}

@media (max-width: 380px) {
    .nbx-auth-panel__help {
        display: none;
    }

    .nbx-auth-oauth {
        font-size: 0.78rem;
        padding-inline: 0.75rem;
    }
}

/* Compact laptop: keep brand viz inside panel without horizontal scroll */
@media (min-width: 1024px) and (max-width: 1279px) {
    .nbx-auth-brand {
        padding: 1.35rem 1.25rem 1.5rem;
    }

    .nbx-auth-brand__headline {
        font-size: clamp(1.55rem, 2.4vw, 2rem);
    }

    .nbx-auth-brand__lead {
        font-size: 0.9rem;
    }

    .nbx-auth-highlights {
        gap: 0.65rem;
    }

    .nbx-auth-brand__viz {
        max-width: 100%;
        margin-top: 1.15rem;
    }

    .nbx-auth-dash__shell {
        grid-template-columns: 96px 1fr;
        min-height: 240px;
        transform: perspective(1200px) rotateX(1.5deg) rotateY(-3deg);
    }

    .nbx-auth-dash__float {
        min-width: 112px;
        transform: scale(0.92);
        transform-origin: center;
    }

    .nbx-auth-panel {
        padding-inline: 1.25rem;
    }

    .nbx-auth-card {
        max-width: min(400px, 100%);
    }
}

/* Short landscape phones / small height: prefer scrollable form, less vertical centering waste */
@media (max-height: 700px) and (max-width: 1023px) {
    .nbx-auth-panel__main {
        align-items: flex-start;
        flex: 1 0 auto;
    }

    .nbx-auth-card {
        padding-bottom: 0.5rem;
    }

    .nbx-auth-mobile-support {
        position: static;
        margin-top: 1rem;
    }
}

@media (min-width: 1024px) and (max-height: 820px) {
    .nbx-auth-brand__viz {
        margin-top: 1rem;
    }

    .nbx-auth-dash__shell {
        min-height: 220px;
    }

    .nbx-auth-trustbar {
        margin-top: 0.75rem;
    }

    .nbx-auth-panel__main {
        align-items: flex-start;
        padding-top: 1rem;
    }
}
