@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

/* ===== BASE ===== */
body {
    background: #07111f;
    overflow: hidden;
    font-family: 'Manrope', 'Segoe UI', Arial, sans-serif !important;
}

.login-shell {
    position: relative;
    display: grid;
    grid-template-columns: 1.12fr .88fr;
    min-height: 100vh;
    background:
        radial-gradient(circle at 14% 18%, rgba(56, 189, 248, .35), transparent 25%),
        radial-gradient(circle at 84% 20%, rgba(124, 58, 237, .22), transparent 28%),
        linear-gradient(135deg, #050b18, #08172e 48%, #0b2a52) !important;
    opacity: 0;
    animation: loginPageReveal 2.8s cubic-bezier(.16, 1, .3, 1) .10s forwards !important;
}

.login-shell::before {
    display: none !important;
}



.login-top-link {
    position: absolute;
    top: 11px;
    right: 65px;
    z-index: 6;
}

.about-gorganix-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: rgba(232, 241, 255, .84);
    text-decoration: none;
    font-size: 12px;
    font-weight: 400 !important;
    letter-spacing: -.01em;
    line-height: 1;
    transition: color .16s ease, transform .16s ease, opacity .16s ease;
}

.about-gorganix-link:hover {
    color: #ffffff;
    transform: translateY(-1px);
}

.about-link-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow:
        0 0 0 4px rgba(56, 189, 248, .12),
        0 0 18px rgba(56, 189, 248, .45);
    flex: 0 0 8px;
}

.login-shell::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(90deg, rgba(0, 0, 0, .8), rgba(0, 0, 0, .25));
}

/* ===== ÁREA VISUAL / LOGO ===== */
.login-visual {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 76px 84px;
    color: #fff;
    background: transparent;
}

.login-visual::before,
.login-visual::after {
    display: none !important;
}

.visual-content {
    position: relative;
    z-index: 1;
    max-width: 690px;
    opacity: 0;
    transform: translateY(28px) scale(.99);
    filter: blur(8px);
    animation: loginContentReveal 2.2s cubic-bezier(.16, 1, .3, 1) .45s forwards !important;
}

.brand-large {
    display: block !important;
    margin-bottom: 14px !important;
    line-height: 0 !important;
    width: fit-content !important;
    cursor: pointer !important;
    transition: transform .16s ease, filter .16s ease !important;
}

.brand-large:hover {
    transform: translateY(-1px) !important;
    filter: brightness(1.06) !important;
}

.brand-large::before {
    content: none !important;
    display: none !important;
}

.brand-large img {
    display: block !important;
    width: min(330px, 120%) !important;
    max-height: 110px !important;
    object-fit: contain !important;
    filter: drop-shadow(0 22px 46px rgba(14, 165, 233, .20));
}

.login-visual h1 {
    max-width: none !important;
    margin: 0;
    color: #fff;
    font-family: 'Manrope', 'Segoe UI', Arial, sans-serif !important;
    font-size: 28px !important;
    font-weight: 600 !important;
    line-height: 1.16 !important;
    letter-spacing: -.025em !important;
    white-space: nowrap !important;
}


.login-mobile-brand {
    display: none;
    cursor: pointer;
    transition: transform .16s ease, filter .16s ease;
}

.login-mobile-brand:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

/* ===== ÁREA DO FORMULÁRIO ===== */
.login-form-area {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    padding: 44px;
}

.login-card {
    width: min(410px, 100%);
    padding: 34px 36px 32px;
    border: 1px solid rgba(226, 235, 247, .92);
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(248, 251, 255, .92));
    box-shadow:
        0 34px 80px rgba(2, 18, 43, .32),
        0 14px 28px rgba(15, 23, 42, .08),
        inset 0 1px 0 rgba(255, 255, 255, .88) !important;
    backdrop-filter: blur(24px);
    opacity: 0;
    transform: translateY(24px) scale(.985);
    filter: blur(7px);
    animation: loginCardReveal 1.45s cubic-bezier(.16, 1, .3, 1) .55s forwards !important;
}

.login-card h2 {
    margin: 0 0 8px;
    color: #101828;
    font-family: 'Manrope', 'Segoe UI', Arial, sans-serif !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    line-height: 1.18 !important;
    letter-spacing: -.025em !important;
}

.login-card p {
    margin: 0 0 24px !important;
    color: #667792 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.5;
}

.login-card label {
    display: block;
    margin: 15px 0 8px !important;
    color: #334155 !important;
    font-size: 12px !important;
    font-weight: 750 !important;
    letter-spacing: -.005em !important;
}

.login-card input {
    width: 100%;
    height: 44px !important;
    padding: 11px 14px !important;
    border: 1px solid rgba(196, 214, 235, .86) !important;
    border-radius: 14px !important;
    outline: none;
    background: rgba(255, 255, 255, .88) !important;
    color: #0f172a !important;
    font-family: 'Manrope', 'Segoe UI', Arial, sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    box-shadow:
        0 12px 28px rgba(15, 23, 42, .055),
        inset 0 1px 0 rgba(255, 255, 255, .96) !important;
    transition: .18s ease;
}

.login-card input:focus {
    border-color: #7dd3fc !important;
    background: #fff !important;
    box-shadow:
        0 0 0 4px rgba(14, 165, 233, .12),
        0 16px 32px rgba(14, 165, 233, .10) !important;
}

.login-card button {
    width: 100%;
    height: 46px !important;
    margin-top: 22px !important;
    padding: 0 18px !important;
    border: 0;
    border-radius: 14px !important;
    color: #fff;
    background: linear-gradient(135deg, #1d63d8 0%, #18aee5 62%, #38bdf8 100%) !important;
    font-family: 'Manrope', 'Segoe UI', Arial, sans-serif !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    letter-spacing: -.01em !important;
    box-shadow:
        0 18px 34px rgba(21, 91, 213, .22),
        inset 0 1px 0 rgba(255, 255, 255, .25) !important;
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease !important;
}

.login-card button:hover {
    transform: translateY(-1px) !important;
    filter: saturate(1.04) !important;
    box-shadow:
        0 22px 42px rgba(21, 91, 213, .26),
        inset 0 1px 0 rgba(255, 255, 255, .28) !important;
}

.login-divider {
    height: 1px;
    margin: 22px 0 12px !important;
    background: linear-gradient(90deg, transparent, rgba(203, 213, 225, .72), transparent) !important;
}

.login-by {
    position: static !important;
    z-index: 5;
    text-align: center !important;
    color: rgba(100, 116, 139, .34) !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    letter-spacing: .025em !important;
}

.alert-error {
    margin: 15px 0;
    padding: 12px;
    border: 1px solid #ffd0d0;
    border-radius: 14px !important;
    background: #fff1f1;
    color: #b42318;
    font-size: 13px !important;
    font-weight: 750 !important;
    box-shadow: 0 12px 28px rgba(180, 35, 24, .08) !important;
}

/* ===== ANIMAÇÕES ===== */
@keyframes loginPageReveal {
    to {
        opacity: 1;
    }
}

@keyframes loginContentReveal {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes loginCardReveal {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* ===== RESPONSIVO ===== */
@media (max-width: 900px) {
    body {
        overflow: auto;
    }

    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-visual {
        display: none;
    }

    .login-form-area {
        min-height: 100vh;
        padding: 24px;
    }

    .login-mobile-brand {
        width: 100%;
        max-width: 410px;
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 0 auto 18px;
        padding: 6px 10px 0;
        position: relative;
        z-index: 3;
    }

    .login-mobile-brand img {
        display: block;
        width: min(255px, 78vw);
        max-height: 86px;
        object-fit: contain;
        filter: drop-shadow(0 18px 34px rgba(14, 165, 233, .24));
    }

    .login-top-link {
        top: 18px;
        right: 20px;
    }

    .about-gorganix-link {
        font-size: 11.5px;
    }

    .login-card {
        position: relative;
        z-index: 3;
    }
}

/* ======================================================================
   Ajuste profissional - Login PC proporcional ao monitor
   ====================================================================== */
@media (min-width: 901px) {
    .login-shell {
        grid-template-columns: minmax(520px, 1fr) minmax(360px, 390px) !important;
        justify-content: stretch !important;
        align-items: stretch !important;
        column-gap: clamp(46px, 5.5vw, 105px) !important;
        padding-left: clamp(42px, 7vw, 132px) !important;
        padding-right: clamp(6px, .6vw, 12px) !important;
        box-sizing: border-box !important;
    }

    .login-visual {
        justify-content: center !important;
        padding: clamp(56px, 7vh, 84px) 0 !important;
    }

    .visual-content {
        width: min(100%, 560px) !important;
        max-width: 560px !important;
    }

    .brand-large img {
        width: clamp(270px, 20vw, 330px) !important;
        max-height: 110px !important;
    }

    .login-visual h1 {
        font-size: clamp(25px, 1.55vw, 28px) !important;
        white-space: nowrap !important;
    }

    .login-form-area {
        justify-content: end !important;
        padding: clamp(38px, 6vh, 64px) 0 !important;
    }

    .login-card {
        width: min(370px, 100%) !important;
        margin-top: 54px !important;
    }
}

@media (min-width: 1600px) {
    .login-shell {
        grid-template-columns: minmax(680px, 1fr) 390px !important;
        column-gap: clamp(70px, 6vw, 118px) !important;
        padding-left: clamp(90px, 8vw, 150px) !important;
        padding-right: clamp(6px, .6vw, 12px) !important;
    }
}

@media (min-width: 2200px) {
    .login-shell {
        grid-template-columns: minmax(760px, 1fr) 390px !important;
        column-gap: 120px !important;
        padding-left: 170px !important;
        padding-right: 12px !important;
    }
}

@media (max-width: 900px) {
    /* Celular: sobe somente o card do login. Logo permanece intacta. */
    .login-card {
        margin-top: -32px !important;
    }
}

@media (max-width: 420px) {
    .login-card {
        margin-top: -36px !important;
    }
}

/* ===== Campo senha com olho - ajuste pontual ===== */
.password-field {
    position: relative;
    width: 100%;
}

.login-card .password-field input {
    padding-right: 50px !important;
    color: #2563eb !important;
    -webkit-text-fill-color: #2563eb !important;
    caret-color: #2563eb !important;
}

.login-card .password-field.password-visible input {
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
}

.login-card .password-field input:-webkit-autofill,
.login-card .password-field input:-webkit-autofill:hover,
.login-card .password-field input:-webkit-autofill:focus {
    -webkit-text-fill-color: #2563eb !important;
    box-shadow:
        0 12px 28px rgba(15, 23, 42, .055),
        inset 0 0 0 1000px rgba(255, 255, 255, .88) !important;
    transition: background-color 99999s ease-in-out 0s;
}

.login-card .password-field.password-visible input:-webkit-autofill,
.login-card .password-field.password-visible input:-webkit-autofill:hover,
.login-card .password-field.password-visible input:-webkit-autofill:focus {
    -webkit-text-fill-color: #0f172a !important;
}

.login-card .password-field input::selection {
    background: rgba(37, 99, 235, .18) !important;
}

.login-card .password-field input::placeholder {
    color: #7ba7df !important;
}

.login-card .password-toggle {
    position: absolute;
    z-index: 3;
    right: 10px;
    top: 50%;
    transform: translateY(-50%) !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: rgba(37, 99, 235, .10) !important;
    color: #1d4ed8 !important;
    box-shadow: none !important;
    line-height: 1 !important;
    transition: background .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease !important;
}

.login-card .password-toggle:hover {
    transform: translateY(-50%) scale(1.06) !important;
    background: rgba(37, 99, 235, .16) !important;
    color: #1e40af !important;
    box-shadow: 0 8px 18px rgba(29, 78, 216, .14) !important;
}

.login-card .password-toggle:focus-visible {
    outline: none;
    background: rgba(37, 99, 235, .16) !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, .16) !important;
}

.login-card .password-toggle::after {
    content: '';
    width: 18px;
    height: 18px;
    display: block;
    background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d4ed8' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-6 10-6 10 6 10 6-3.6 6-10 6-10-6-10-6Z'/%3E%3Ccircle cx='12' cy='12' r='2.8'/%3E%3C/svg%3E");
}

.login-card .password-toggle.is-visible::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d4ed8' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3l18 18'/%3E%3Cpath d='M10.58 10.58A2 2 0 0 0 12 14a2 2 0 0 0 1.42-.58'/%3E%3Cpath d='M9.88 5.09A10.94 10.94 0 0 1 12 5c6.4 0 10 7 10 7a17.55 17.55 0 0 1-3.06 3.73'/%3E%3Cpath d='M6.61 6.61C4.62 7.88 3.2 10.1 2 12c0 0 3.6 7 10 7 1.86 0 3.47-.41 4.85-1.03'/%3E%3C/svg%3E");
}

.login-card .password-toggle .eye-icon {
    display: none !important;
}
