/* =========================================================
 * NAPOLEON LOGIN v2 — CSS escopado em .np-login-v2
 * Todas as classes prefixadas com .np- pra nao colidir com lagom2.
 * Carregado pela overwrites/login.tpl quando o usuario nao esta logado.
 * ========================================================= */

/* Viewport breakout: força a largura total ignorando .container/.main-body do lagom2 */
.np-login-v2 {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    overflow-x: hidden;
}

.np-login-v2 {
    --np-green-1:    #062818;
    --np-green-2:    #0c4d28;
    --np-green-3:    #1b8048;
    --np-green-4:    #25a559;
    --np-green-5:    #3fd97e;
    --np-green-6:    #80f5b2;
    --np-green-ring: rgba(37,165,89,0.18);
    --np-green-glow: rgba(63,217,126,0.40);

    --np-ink:        #0a0a0c;
    --np-text:       #14171c;
    --np-text-2:     #4a5159;
    --np-text-3:     #6c727a;
    --np-text-4:     #9aa0a8;
    --np-line:       rgba(0,0,0,0.08);
    --np-line-2:     rgba(0,0,0,0.14);
    --np-input-bg:   #f5f6f8;
    --np-input-hover:#eef0f3;

    --np-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

    --np-t-fast: 140ms cubic-bezier(0.4, 0, 0.2, 1);
    --np-t:      200ms cubic-bezier(0.4, 0, 0.2, 1);

    font-family: var(--np-sans);
    color: var(--np-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Reset basico dentro do escopo */
.np-login-v2 *, .np-login-v2 *::before, .np-login-v2 *::after { box-sizing: border-box; }

/* ========== SPLIT LAYOUT ========== */
.np-split {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr);
    gap: 20px;
    padding: 20px;
    min-height: 100vh;
    background: #fafafb;
}

/* ========== LADO ESQUERDO — ARTE FLUIDA ========== */
.np-hero {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: var(--np-ink);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 38px 42px;
    min-height: calc(100vh - 40px);
    isolation: isolate;
}

.np-wave {
    position: absolute;
    pointer-events: none;
    will-change: transform;
    border-radius: 50%;
    filter: blur(70px);
}
.np-wave-1 {
    width: 120%; height: 80%;
    top: -20%; left: -25%;
    background: radial-gradient(ellipse at center, var(--np-green-4) 0%, transparent 65%);
    opacity: 0.9;
    animation: np-drift-1 14s ease-in-out infinite alternate;
}
.np-wave-2 {
    width: 100%; height: 85%;
    top: 10%; left: 30%;
    background: radial-gradient(ellipse at center, var(--np-green-5) 0%, transparent 60%);
    opacity: 0.85;
    mix-blend-mode: screen;
    animation: np-drift-2 11s ease-in-out infinite alternate;
}
.np-wave-3 {
    width: 110%; height: 90%;
    bottom: -35%; left: -15%;
    background: radial-gradient(ellipse at center, var(--np-green-3) 0%, transparent 65%);
    opacity: 0.95;
    animation: np-drift-3 16s ease-in-out infinite alternate;
}
.np-wave-4 {
    width: 90%; height: 70%;
    top: 35%; right: -25%;
    background: radial-gradient(ellipse at center, var(--np-green-6) 0%, transparent 55%);
    opacity: 0.55;
    mix-blend-mode: screen;
    animation: np-drift-4 18s ease-in-out infinite alternate;
}
.np-wave-5 {
    width: 80%; height: 60%;
    top: 5%; right: -15%;
    background: radial-gradient(ellipse at center, #ffffff 0%, transparent 60%);
    opacity: 0.20;
    mix-blend-mode: overlay;
    animation: np-drift-5 13s ease-in-out infinite alternate;
}
.np-wave-6 {
    width: 90%; height: 70%;
    bottom: 5%; right: -10%;
    background: radial-gradient(ellipse at center, var(--np-green-5) 0%, transparent 55%);
    opacity: 0.50;
    mix-blend-mode: screen;
    animation: np-drift-6 10s ease-in-out infinite alternate;
}

@keyframes np-drift-1 { 0% { transform: translate(0,0) scale(1) rotate(0deg); } 100% { transform: translate(28%,18%) scale(1.25) rotate(15deg); } }
@keyframes np-drift-2 { 0% { transform: translate(0,0) scale(1) rotate(0deg); } 100% { transform: translate(-25%,22%) scale(1.4) rotate(-25deg); } }
@keyframes np-drift-3 { 0% { transform: translate(0,0) scale(1) rotate(0deg); } 100% { transform: translate(20%,-28%) scale(1.45) rotate(28deg); } }
@keyframes np-drift-4 { 0% { transform: translate(0,0) scale(1) rotate(0deg); } 100% { transform: translate(-35%,-18%) scale(1.55) rotate(-32deg); } }
@keyframes np-drift-5 { 0% { transform: translate(0,0) scale(1) rotate(0deg); } 100% { transform: translate(25%,30%) scale(1.3) rotate(35deg); } }
@keyframes np-drift-6 { 0% { transform: translate(0,0) scale(1) rotate(0deg); } 100% { transform: translate(-30%,-25%) scale(1.5) rotate(-18deg); } }

.np-streaks {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.5;
    mix-blend-mode: screen;
    animation: np-streak-drift 24s linear infinite;
}
.np-streaks svg {
    width: 110%; height: 110%;
    display: block;
    margin-left: -5%;
}
@keyframes np-streak-drift {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-4%); }
}

.np-particles { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.np-particle {
    position: absolute;
    width: 3px; height: 3px;
    border-radius: 999px;
    background: rgba(255,255,255,0.6);
    box-shadow: 0 0 6px rgba(255,255,255,0.5);
    opacity: 0;
}
.np-particle.p1 { top: 20%; left: 15%; animation: np-float-up 7s ease-in-out infinite 0s;   }
.np-particle.p2 { top: 60%; left: 75%; animation: np-float-up 9s ease-in-out infinite 1.5s; }
.np-particle.p3 { top: 35%; left: 55%; animation: np-float-up 11s ease-in-out infinite 3s;  }
.np-particle.p4 { top: 80%; left: 25%; animation: np-float-up 8s ease-in-out infinite 4s;   }
.np-particle.p5 { top: 45%; left: 88%; animation: np-float-up 10s ease-in-out infinite 5.5s;}
.np-particle.p6 { top: 15%; left: 65%; animation: np-float-up 12s ease-in-out infinite 2.5s;}
.np-particle.p7 { top: 70%; left: 45%; animation: np-float-up 9s ease-in-out infinite 6.5s; }
.np-particle.p8 { top: 25%; left: 80%; animation: np-float-up 11s ease-in-out infinite 7s;  }
.np-particle.p9 { top: 55%; left: 20%; animation: np-float-up 8s ease-in-out infinite 8.5s; }

@keyframes np-float-up {
    0%   { transform: translateY(20px) scale(0.5); opacity: 0; }
    10%  { opacity: 0.8; }
    50%  { transform: translateY(-80px) scale(1.2); opacity: 1; }
    90%  { opacity: 0.5; }
    100% { transform: translateY(-160px) scale(0.4); opacity: 0; }
}

.np-noise {
    position: absolute; inset: 0;
    z-index: 3;
    pointer-events: none;
    opacity: 0.05;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.np-hero-top {
    position: relative; z-index: 4;
    display: flex; align-items: center; gap: 14px;
    color: rgba(255,255,255,0.85);
    font-family: var(--np-sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.np-hero-top::after {
    content: "";
    flex: 1; height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,0.5), transparent);
    max-width: 180px;
}

.np-hero-bottom { position: relative; z-index: 4; }
.np-hero-title {
    margin: 0 0 18px;
    font-family: var(--np-sans);
    font-size: 52px;
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.035em;
    color: #fff;
}
.np-hero-title .accent {
    background: linear-gradient(90deg, var(--np-green-5) 0%, var(--np-green-6) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.np-hero-sub {
    margin: 0;
    max-width: 380px;
    font-size: 14.5px;
    line-height: 1.55;
    color: rgba(255,255,255,0.75);
    font-weight: 400;
}

/* ========== LADO DIREITO — FORM ========== */
.np-form-side {
    position: relative;
    display: flex; flex-direction: column;
    padding: 56px 60px 40px;
    background: #fff;
    border-radius: 24px;
}
.np-form-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* ========== LOGO COM ANIMACAO "CONSTRUCTION" ========== */
.np-form-logo {
    display: flex; align-items: center; justify-content: center;
    margin: 0 0 32px;
    padding: 0;
}
.np-logo-svg {
    position: relative;
    height: 60px;
    width: auto;
    cursor: default;
    transition: transform 320ms cubic-bezier(0.2, 1.4, 0.3, 1);
    animation: np-logo-container 700ms cubic-bezier(0.2, 1.4, 0.3, 1) both;
}
.np-logo-svg svg {
    height: 100%;
    width: auto;
    display: block;
    overflow: visible;
}
@keyframes np-logo-container {
    0%   { opacity: 0; transform: scale(0.92); }
    100% { opacity: 1; transform: scale(1);    }
}

.np-tile-group {
    transform-origin: 73.8px 73.8px;
    transform-box: view-box;
    animation: np-tile-bg-in 450ms cubic-bezier(0.2, 1.4, 0.3, 1) 80ms both;
}
@keyframes np-tile-bg-in {
    0%   { opacity: 0; transform: scale(0.7); }
    100% { opacity: 1; transform: scale(1);   }
}

.np-tile-arrow {
    transform-origin: 73px 73px;
    transform-box: view-box;
    animation: np-arrow-in 500ms cubic-bezier(0.2, 1.55, 0.3, 1) 300ms both;
}
@keyframes np-arrow-in {
    0%   { opacity: 0; transform: scale(0.2) rotate(-8deg); }
    100% { opacity: 1; transform: scale(1)   rotate(0deg);  }
}

.np-tile-dot {
    transform-origin: 33.95px 93.36px;
    transform-box: view-box;
    animation:
        np-dot-in    420ms cubic-bezier(0.2, 1.6, 0.3, 1) 500ms both,
        np-dot-pulse 5s   ease-in-out                    1800ms infinite;
}
@keyframes np-dot-in {
    0%   { opacity: 0; transform: scale(0); }
    100% { opacity: 1; transform: scale(1); }
}
@keyframes np-dot-pulse {
    0%, 92%, 100% { transform: scale(1);   }
    96%           { transform: scale(1.18);}
}

.np-word-letter {
    fill: #000000;
    opacity: 0;
    transform: translateX(-4px);
    animation: np-letter-in 450ms cubic-bezier(0.2, 1, 0.3, 1) both;
}
.np-word-letter.l1 { animation-delay: 200ms; }
.np-word-letter.l2 { animation-delay: 260ms; }
.np-word-letter.l3 { animation-delay: 320ms; }
.np-word-letter.l4 { animation-delay: 380ms; }
.np-word-letter.l5 { animation-delay: 440ms; }
.np-word-letter.l6 { animation-delay: 500ms; }
.np-word-letter.l7 { animation-delay: 560ms; }
.np-word-letter.l8 { animation-delay: 620ms; }

@keyframes np-letter-in {
    0%   { opacity: 0; transform: translateX(-4px); }
    100% { opacity: 1; transform: translateX(0);    }
}

.np-logo-svg:hover { transform: scale(1.03); }

/* ========== FORM ========== */
.np-form-block {
    width: 100%;
    max-width: 420px;
    margin: 0;
    padding: 0;
}

.np-form-head { text-align: center; margin-bottom: 28px; }
.np-form-title {
    margin: 0 0 12px;
    font-family: var(--np-sans);
    font-size: 34px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--np-text);
}
.np-form-title .emoji {
    display: inline-block;
    margin-right: 6px;
    transform-origin: 70% 80%;
    animation: np-wave 1.6s ease-in-out 700ms;
}
@keyframes np-wave {
    0%, 100% { transform: rotate(0); }
    25%      { transform: rotate(16deg); }
    75%      { transform: rotate(-10deg); }
}
.np-form-sub {
    margin: 0;
    font-size: 14.5px;
    color: var(--np-text-3);
    font-weight: 400;
}

.np-form { display: flex; flex-direction: column; gap: 18px; }

.np-field { position: relative; }
.np-field-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 8px;
}
.np-field-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--np-text-2);
}
.np-field-link {
    font-size: 13px;
    color: var(--np-text-2);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--np-t);
}
.np-field-link:hover { color: var(--np-text); text-decoration: underline; }

.np-input-wrap { position: relative; }
.np-input {
    width: 100%;
    height: 50px;
    padding: 0 16px;
    background: var(--np-input-bg);
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--np-text);
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 500;
    transition: background var(--np-t), border-color var(--np-t), box-shadow var(--np-t);
    -webkit-appearance: none;
}
.np-input::placeholder { color: var(--np-text-4); font-weight: 400; }
.np-input:hover:not(:focus) { background: var(--np-input-hover); }
.np-input:focus {
    outline: none;
    background: #fff;
    border-color: var(--np-green-4);
    box-shadow: 0 0 0 4px var(--np-green-ring);
}

.np-pw-toggle {
    position: absolute;
    right: 8px; top: 50%;
    transform: translateY(-50%);
    width: 36px; height: 36px;
    border-radius: 8px;
    background: transparent;
    border: 0;
    color: var(--np-text-4);
    cursor: pointer;
    display: grid; place-items: center;
    transition: color var(--np-t), background var(--np-t);
}
.np-pw-toggle:hover { color: var(--np-text-2); background: rgba(0,0,0,0.05); }
.np-pw-toggle svg { width: 18px; height: 18px; }

.np-check {
    display: inline-flex; align-items: center; gap: 9px;
    cursor: pointer;
    font-size: 13.5px;
    color: var(--np-text-2);
    user-select: none;
    margin-top: 4px;
}
.np-check input { position: absolute; opacity: 0; pointer-events: none; }
.np-check-box {
    width: 18px; height: 18px;
    border-radius: 5px;
    background: #fff;
    border: 1.5px solid var(--np-line-2);
    display: grid; place-items: center;
    transition: background var(--np-t), border-color var(--np-t);
}
.np-check-box svg {
    width: 12px; height: 12px;
    color: #fff;
    opacity: 0;
    transform: scale(0.4);
    transition: opacity 120ms ease, transform 220ms cubic-bezier(0.2, 1.6, 0.3, 1);
}
.np-check input:checked + .np-check-box {
    background: var(--np-ink);
    border-color: var(--np-ink);
}
.np-check input:checked + .np-check-box svg {
    opacity: 1;
    transform: scale(1);
}

.np-btn-primary {
    position: relative;
    width: 100%;
    height: 52px;
    margin-top: 8px;
    padding: 0 22px;
    background: var(--np-ink);
    color: #fff;
    border: 1px solid var(--np-ink);
    border-radius: 10px;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    transition: background var(--np-t), transform 80ms ease, box-shadow var(--np-t);
    box-shadow: 0 1px 0 rgba(255,255,255,0.08) inset, 0 6px 18px rgba(0,0,0,0.18);
}
.np-btn-primary:hover {
    background: #1a1a1d;
    box-shadow: 0 1px 0 rgba(255,255,255,0.1) inset, 0 8px 22px rgba(0,0,0,0.25);
}
.np-btn-primary:active { transform: translateY(1px); }
.np-btn-primary:focus-visible {
    outline: none;
    box-shadow: 0 1px 0 rgba(255,255,255,0.08) inset, 0 0 0 4px var(--np-green-ring), 0 6px 18px rgba(0,0,0,0.2);
}
.np-btn-primary svg {
    width: 16px; height: 16px;
    transition: transform var(--np-t);
}
.np-btn-primary:hover svg { transform: translateX(2px); }

.np-captcha {
    display: flex;
    justify-content: center;
    margin-top: 4px;
}
.np-captcha img { max-width: 100%; height: auto; }

/* Flash messages WHMCS — adapta cores */
.np-login-v2 .alert,
.np-login-v2 .alert-lagom {
    margin: 0 0 16px;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid;
    font-size: 13.5px;
    line-height: 1.4;
}
.np-login-v2 .alert-danger,
.np-login-v2 .alert-lagom.alert-danger {
    background: rgba(255,80,100,0.08);
    border-color: rgba(255,80,100,0.30);
    color: #b21f33;
}
.np-login-v2 .alert-success,
.np-login-v2 .alert-lagom.alert-success {
    background: rgba(37,165,89,0.08);
    border-color: rgba(37,165,89,0.30);
    color: #0d5e2d;
}
.np-login-v2 .alert-info,
.np-login-v2 .alert-lagom.alert-info {
    background: rgba(79,159,255,0.08);
    border-color: rgba(79,159,255,0.30);
    color: #1a5fb4;
}

.np-form-footer {
    padding-top: 24px;
    display: flex; justify-content: center; align-items: center;
    font-size: 12px;
    color: var(--np-text-4);
}

/* ========== RESPONSIVO ========== */

/* Tablet 769–960 */
@media (max-width: 960px) and (min-width: 769px) {
    .np-split { gap: 16px; padding: 16px; }
    .np-hero { padding: 32px 32px; min-height: calc(100vh - 32px); }
    .np-hero-title { font-size: 44px; }
    .np-form-side { padding: 48px 40px 32px; }
    .np-form-title { font-size: 30px; }
    .np-logo-svg { height: 54px; }
}

/* Mobile ≤ 768 */
@media (max-width: 768px) {
    .np-split {
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 0;
        min-height: 100vh;
    }
    .np-form-side {
        order: 1;
        flex: 1;
        padding: 40px 24px 24px;
        min-height: calc(100vh - 120px);
        border-radius: 0;
    }
    .np-logo-svg { height: 52px; }
    .np-form-logo { margin: 0 0 28px; }
    .np-form-title { font-size: 28px; }
    .np-form-sub { font-size: 13.5px; }

    .np-hero {
        order: 2;
        flex-shrink: 0;
        min-height: 0;
        height: 120px;
        border-radius: 0;
        padding: 0 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    .np-hero-top { display: none; }
    .np-hero-bottom { position: relative; z-index: 4; }
    .np-hero-title {
        font-size: 18px;
        font-weight: 600;
        line-height: 1.25;
        letter-spacing: -0.01em;
        margin: 0;
    }
    .np-hero-title br { display: none; }
    .np-hero-title .accent { font-weight: 600; }
    .np-hero-sub { display: none; }

    .np-wave-5, .np-wave-6 { display: none; }
    .np-particle { display: none; }
    .np-streaks { opacity: 0.3; }
}

@media (max-width: 480px) {
    .np-form-side { padding: 32px 20px 20px; }
    .np-form-logo { margin: 0 0 24px; }
    .np-logo-svg { height: 48px; }
    .np-form-title { font-size: 26px; }
    .np-form-block { max-width: 100%; }
    .np-input { height: 48px; font-size: 14px; }
    .np-btn-primary { height: 50px; }

    .np-hero { height: 100px; padding: 0 20px; }
    .np-hero-title { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .np-wave, .np-streaks, .np-particle,
    .np-logo-svg, .np-tile-group, .np-tile-arrow, .np-tile-dot, .np-word-letter,
    .np-form-title .emoji { animation: none !important; }
    .np-logo-svg, .np-tile-group, .np-tile-arrow, .np-tile-dot, .np-word-letter {
        opacity: 1; transform: none;
    }
}
