/* ==========================================================================
   Biznapoa ERP — minimal premium sign-in (login page only)
   Scoped to body.bnl-auth so register / recovery / public pages are untouched.
   ========================================================================== */

body.bnl-auth {
    --bnl-ink: #170a2b;
    --bnl-muted: #6b6f86;
    --bnl-line: #e6e2f0;
    --bnl-line-strong: #d3cce4;
    --bnl-pink: #f8118f;
    --bnl-violet: #7c3aed;
    --bnl-focus: #a855f7;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--bnl-ink);
    font-family: Inter, "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Kill the framework chrome on this page only */
body.bnl-auth .container-fluid,
body.bnl-auth .container-fluid > .row,
body.bnl-auth .row {
    display: block;
    width: 100% !important;
    max-width: none !important;
    min-height: 0;
    margin: 0 !important;
    padding: 0 !important;
}

body.bnl-auth .biznaga-auth-left-nav,
body.bnl-auth .biznaga-auth-right-nav,
body.bnl-auth .pace,
body.bnl-auth .pace-progress,
body.bnl-auth .pace-activity {
    display: none !important;
}

body.bnl-auth .col-md-10 {
    display: none;
}

/* --------------------------------------------------------------------------
   Simple stage — centered form with background animation around logo
   -------------------------------------------------------------------------- */

.bnl-stage {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: clamp(18px, 4vh, 40px) clamp(14px, 4vw, 40px);
    background-color: #ffffff;
}

/* Background animated blobs — centered around the logo area */
.bnl-stage::before,
.bnl-stage::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
}

.bnl-stage::before {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle at 30% 30%, rgba(248, 17, 143, 0.18), transparent 50%),
                radial-gradient(circle at 70% 70%, rgba(124, 58, 237, 0.16), transparent 50%);
    animation: bnl-drift 20s ease-in-out infinite alternate;
}

.bnl-stage::after {
    width: 300px;
    height: 300px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(.75);
    background: radial-gradient(circle at 50% 50%, rgba(236, 22, 140, 0.12), transparent 50%);
    animation: bnl-drift 24s ease-in-out infinite alternate reverse;
}

/* Bring form above the background */
.bnl-stage > .bnl-form-pane {
    position: relative;
    z-index: 1;
}

/* --------------------------------------------------------------------------
   Brand logo — centered only, no card/box
   -------------------------------------------------------------------------- */

.bnl-brand {
    margin: 0 0 28px;
    animation: bnl-fade .6s cubic-bezier(.16, 1, .3, 1) both;
    position: relative;
    z-index: 2;
}

.bnl-brand a { display: inline-flex; }

.bnl-brand img {
    display: block;
    width: auto;
    max-width: 200px;
    height: auto;
    object-fit: contain;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
}

/* Floating highlight orbit around the logo area — simplified */
.bnl-brand::before {
    content: '';
    position: absolute;
    width: 180px;
    height: 180px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(124, 58, 237, 0.1);
    border-radius: 50%;
    animation: bnl-pulse 3s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes bnl-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* --------------------------------------------------------------------------
   Headline
   -------------------------------------------------------------------------- */

.bnl-head {
    margin: 0 0 20px;
    animation: bnl-fade .6s .1s cubic-bezier(.16, 1, .3, 1) both;
}

.bnl-eyebrow {
    margin: 0 0 8px;
    color: var(--bnl-violet);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.bnl-head h1 {
    margin: 0 0 6px;
    color: var(--bnl-ink);
    font-size: clamp(26px, 2.2vw, 30px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.035em;
}

.bnl-sub {
    margin: 0;
    color: var(--bnl-muted);
    font-size: 13px;
    line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Alerts
   -------------------------------------------------------------------------- */

.bnl-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 18px;
    padding: 10px 14px;
    border: 1px solid #f3c9d7;
    border-radius: 12px;
    background: #fff5f8;
    color: #b3134a;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
}

.bnl-alert.is-ok {
    border-color: #bfe6d3;
    background: #f2fbf6;
    color: #0e7a4a;
}

.bnl-alert svg {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    margin-top: 1px;
}

.bnl-alert.is-error.is-in {
    animation: bnl-shake .42s cubic-bezier(.36, .07, .19, .97);
}

/* --------------------------------------------------------------------------
   Form
   -------------------------------------------------------------------------- */

.bnl-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: bnl-fade .6s .18s cubic-bezier(.16, 1, .3, 1) both;
    width: 100%;
    max-width: 400px;
}

.bnl-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bnl-label {
    margin: 0;
    color: #2b2043;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .01em;
}

/* Input controls */
body.bnl-auth .bnl-control {
    position: relative;
    display: flex;
    align-items: center;
    height: 50px;
    border: 1.5px solid var(--bnl-line);
    border-radius: 12px;
    background: #fbfafe;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

body.bnl-auth .bnl-control:hover {
    border-color: var(--bnl-line-strong);
}

body.bnl-auth .bnl-control:focus-within {
    border-color: var(--bnl-focus);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(168, 85, 247, .14);
}

.bnl-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: #9d97b3;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
    transition: color .18s ease, transform .18s ease;
}

.bnl-control:focus-within .bnl-icon {
    color: var(--bnl-violet);
    transform: scale(1.04);
}

/* Input */
body.bnl-auth .bnl-input {
    width: 100%;
    height: 100%;
    min-width: 0;
    padding: 0 16px 0 42px;
    border: 0 !important;
    border-radius: 12px;
    outline: 0;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--bnl-ink);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: normal;
    -webkit-text-fill-color: var(--bnl-ink);
}

body.bnl-auth .bnl-input::placeholder {
    color: #a8a2b9;
    font-weight: 400;
    -webkit-text-fill-color: #a8a2b9;
}

/* Password reveal */
body.bnl-auth .bnl-input-password { padding-right: 44px; }

body.bnl-auth .bnl-input:-webkit-autofill,
body.bnl-auth .bnl-input:-webkit-autofill:hover,
body.bnl-auth .bnl-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--bnl-ink);
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
    box-shadow: 0 0 0 1000px #ffffff inset;
    caret-color: var(--bnl-ink);
}

/* Reveal button */
.bnl-reveal {
    position: absolute;
    right: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #8b85a0;
    cursor: pointer;
    transition: background .16s ease, color .16s ease;
    -webkit-tap-highlight-color: transparent;
}

.bnl-reveal:hover { background: #f4eefc; color: var(--bnl-violet); }
.bnl-reveal:focus-visible { outline: 3px solid rgba(168, 85, 247, .35); outline-offset: 1px; }
.bnl-reveal.is-on { color: var(--bnl-violet); }

.bnl-reveal svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.bnl-reveal .bnl-eye { display: none; }
.bnl-reveal.is-on .bnl-eye { display: block; }
.bnl-reveal .bnl-eye-off { display: none; }
.bnl-reveal.is-on .bnl-eye-off { display: block; }

/* Remember row */
.bnl-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: -2px;
}

.bnl-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: #4a4460;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
}

body.bnl-auth .bnl-check input[type="checkbox"] {
    position: relative;
    width: 16px;
    height: 16px;
    margin: 0;
    border: 1.5px solid #cdc6df;
    border-radius: 4px;
    background: #ffffff;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

body.bnl-auth .bnl-check input[type="checkbox"]:hover { border-color: var(--bnl-focus); }

body.bnl-auth .bnl-check input[type="checkbox"]:checked {
    border-color: transparent;
    background: linear-gradient(135deg, var(--bnl-pink), var(--bnl-violet));
}

body.bnl-auth .bnl-check input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 5px;
    width: 5px;
    height: 7px;
    border: 2px solid #ffffff;
    border-top: 0;
    border-left: 0;
    transform: rotate(42deg);
}

body.bnl-auth .bnl-check input[type="checkbox"]:focus-visible {
    outline: 3px solid rgba(168, 85, 247, .35);
    outline-offset: 2px;
}

/* Submit */
body.bnl-auth .bnl-submit {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 50px;
    margin-top: 6px;
    padding: 0 20px;
    overflow: hidden;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8118f 0%, #8b2fe0 55%, #6d28d9 100%);
    box-shadow: 0 12px 24px rgba(124, 58, 237, .3), 0 2px 4px rgba(248, 17, 143, .2);
    color: #ffffff !important;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .01em;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .2s ease, filter .2s ease;
    -webkit-tap-highlight-color: transparent;
}

body.bnl-auth .bnl-submit::after {
    content: "";
    position: absolute;
    top: 0;
    left: -70%;
    width: 45%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .38), transparent);
    transform: skewX(-20deg);
    transition: left .6s ease;
    pointer-events: none;
}

body.bnl-auth .bnl-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(124, 58, 237, .36), 0 3px 6px rgba(248, 17, 143, .24);
    filter: brightness(1.03);
}

body.bnl-auth .bnl-submit:hover::after { left: 130%; }

body.bnl-auth .bnl-submit:active {
    transform: translateY(0);
    box-shadow: 0 8px 16px rgba(124, 58, 237, .3);
}

body.bnl-auth .bnl-submit:focus-visible {
    outline: 3px solid rgba(168, 85, 247, .45);
    outline-offset: 3px;
}

.bnl-submit-arrow {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .2s ease;
}

body.bnl-auth .bnl-submit:hover .bnl-submit-arrow { transform: translateX(3px); }

.bnl-form.is-submitting .bnl-submit {
    pointer-events: none;
    filter: saturate(.92);
}

.bnl-form.is-submitting .bnl-submit-arrow { display: none; }

.bnl-form.is-submitting .bnl-submit::before {
    content: "";
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: bnl-spin .75s linear infinite;
}

/* --------------------------------------------------------------------------
   Motion
   -------------------------------------------------------------------------- */

@keyframes bnl-rise {
    from { opacity: 0; transform: translateY(18px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes bnl-fade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bnl-shake {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(2px); }
    30%, 50%, 70% { transform: translateX(-4px); }
    40%, 60% { transform: translateX(4px); }
}

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

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .bnl-stage,
    .bnl-brand,
    .bnl-head,
    .bnl-form,
    .bnl-alert,
    .bnl-submit,
    .bnl-icon,
    .bnl-reveal,
    .bnl-check input[type="checkbox"] {
        animation: none !important;
        transition: none !important;
    }
}

/* --------------------------------------------------------------------------
   Small viewport tweaks
   -------------------------------------------------------------------------- */

@media (max-width: 400px) {
    .bnl-form { max-width: 100%; margin: 0 12px; }
    .bnl-head h1 { font-size: 24px; }
    .bnl-eyebrow { font-size: 10px; }
    .bnl-secure { display: none; }
    .bnl-copyright { margin-top: 14px; font-size: 10px; }
}