/* Login Portal Premium | Finconex ERP V2 - Proporção Ajustada */

:root {
    --login-bg-1: #020617;
    --login-bg-2: #0f172a;
    --login-blue: #2563eb;
    --login-cyan: #38bdf8;
    --login-text: #f8fafc;
    --login-muted: #cbd5e1;
    --login-soft: #94a3b8;
    --login-card: rgba(15, 23, 42, .70);
    --login-border: rgba(255,255,255,.12);
}

* {
    box-sizing: border-box;
}

html,
body.login-portal-page {
    min-height: 100%;
}

.login-portal-page {
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 12% 18%, rgba(56, 189, 248, .16), transparent 26%),
        radial-gradient(circle at 88% 78%, rgba(37, 99, 235, .20), transparent 32%),
        linear-gradient(135deg, var(--login-bg-1), var(--login-bg-2));
    color: var(--login-text);
}

.portal-bg,
.portal-grid-bg,
.portal-orb {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.portal-grid-bg {
    opacity: .14;
    background-image:
        linear-gradient(rgba(148, 163, 184, .14) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, .14) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: radial-gradient(circle at center, black 0%, transparent 72%);
}

.portal-orb {
    width: 300px;
    height: 300px;
    border-radius: 999px;
    filter: blur(80px);
    opacity: .55;
    animation: portalFloat 10s ease-in-out infinite;
}

.portal-orb--one {
    background: rgba(56, 189, 248, .20);
    top: 7%;
    left: 6%;
}

.portal-orb--two {
    background: rgba(37, 99, 235, .22);
    right: 8%;
    bottom: 5%;
    animation-delay: 1.5s;
}

.portal-orb--three {
    background: rgba(96, 165, 250, .12);
    width: 210px;
    height: 210px;
    left: 48%;
    top: 12%;
    animation-delay: 2.8s;
}

.portal-shell {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    width: min(1080px, calc(100% - 40px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.03fr) minmax(380px, .78fr);
    gap: 24px;
    align-items: center;
    justify-content: center;
    padding: 28px 0;
}

.portal-showcase,
.portal-card {
    border: 1px solid var(--login-border);
    background: rgba(15, 23, 42, .58);
    box-shadow: 0 24px 75px rgba(0,0,0,.38);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 30px;
    overflow: hidden;
    position: relative;
}

.portal-showcase {
    padding: 36px 38px;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.portal-showcase::after,
.portal-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(56,189,248,.30), rgba(255,255,255,.04), rgba(37,99,235,.24));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

.portal-badge,
.portal-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    border: 1px solid rgba(56, 189, 248, .24);
    background: rgba(56, 189, 248, .09);
    color: #7dd3fc;
    border-radius: 999px;
    padding: 8px 13px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.portal-showcase h1 {
    margin: 20px 0 14px;
    max-width: 620px;
    font-size: clamp(34px, 4.1vw, 52px);
    line-height: 1.02;
    letter-spacing: -0.065em;
    color: #fff;
}

.portal-showcase p {
    max-width: 590px;
    margin: 0;
    color: var(--login-muted);
    font-size: 15px;
    line-height: 1.72;
}

.portal-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 26px;
}

.portal-metrics div {
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(2, 6, 23, .30);
    border-radius: 19px;
    padding: 15px 16px;
}

.portal-metrics strong {
    display: block;
    color: #fff;
    font-size: 24px;
    letter-spacing: -0.04em;
}

.portal-metrics span {
    display: block;
    margin-top: 5px;
    color: var(--login-soft);
    font-size: 12px;
}

.portal-pill-list {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.portal-pill-list span {
    border: 1px solid rgba(147, 197, 253, .24);
    background: rgba(37, 99, 235, .12);
    color: #dbeafe;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 800;
}

.portal-frase {
    margin-top: 26px;
    color: #e2e8f0;
    line-height: 1.55;
    font-size: 14px;
}

.portal-frase strong,
.portal-frase span {
    display: block;
}

.portal-card {
    padding: 30px;
    color: #fff;
    align-self: center;
}

.portal-card__head h2 {
    margin: 12px 0 7px;
    font-size: 27px;
    letter-spacing: -0.04em;
}

.portal-card__head p {
    margin: 0 0 18px;
    color: var(--login-muted);
    line-height: 1.5;
    font-size: 14px;
}

.portal-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
    margin-bottom: 16px;
}

.portal-option {
    border: 1px solid rgba(148, 163, 184, .20);
    background: rgba(15, 23, 42, .72);
    color: var(--login-muted);
    border-radius: 16px;
    padding: 11px 10px;
    cursor: pointer;
    transition: .22s ease;
    text-align: left;
}

.portal-option strong,
.portal-option span {
    display: block;
}

.portal-option strong {
    color: #fff;
    font-size: 11px;
    line-height: 1.25;
}

.portal-option span {
    margin-top: 4px;
    color: var(--login-soft);
    font-size: 10px;
}

.portal-option:hover,
.portal-option.is-active {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, .48);
    background: rgba(37, 99, 235, .30);
    box-shadow: 0 14px 26px rgba(37,99,235,.16);
}

.portal-alert {
    padding: 11px 13px;
    border-radius: 15px;
    margin-bottom: 14px;
    font-size: 12px;
    line-height: 1.42;
}

.portal-alert--error {
    color: #fecaca;
    background: rgba(239, 68, 68, .13);
    border: 1px solid rgba(239, 68, 68, .30);
}

.portal-alert--success {
    color: #bbf7d0;
    background: rgba(34, 197, 94, .12);
    border: 1px solid rgba(34, 197, 94, .28);
}

.portal-form {
    display: grid;
    gap: 13px;
}

.portal-form label > span {
    display: block;
    margin-bottom: 7px;
    color: #e2e8f0;
    font-size: 12px;
    font-weight: 800;
}

.portal-input {
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 11px;
    border: 1px solid rgba(148, 163, 184, .20);
    background: rgba(2, 6, 23, .34);
    border-radius: 17px;
    padding: 0 14px;
    transition: .22s ease;
}

.portal-input:focus-within {
    border-color: rgba(56, 189, 248, .66);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, .10);
    transform: translateY(-1px);
}

.portal-input svg {
    width: 19px;
    height: 19px;
    color: #93c5fd;
    flex-shrink: 0;
}

.portal-input input {
    width: 100%;
    height: 52px;
    border: 0;
    outline: 0;
    background: transparent !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    caret-color: #fff;
    font-size: 14px;
}

.portal-input input::placeholder {
    color: rgba(203, 213, 225, .48);
}

.portal-input input:-webkit-autofill,
.portal-input input:-webkit-autofill:hover,
.portal-input input:-webkit-autofill:focus,
.portal-input input:-webkit-autofill:active {
    -webkit-text-fill-color: #fff !important;
    caret-color: #fff !important;
    -webkit-box-shadow: 0 0 0 1000px rgba(2, 6, 23, .92) inset !important;
    box-shadow: 0 0 0 1000px rgba(2, 6, 23, .92) inset !important;
    border-radius: 14px !important;
    transition: background-color 9999s ease-in-out 0s;
}

.portal-eye {
    background: transparent;
    border: 0;
    color: #93c5fd;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.portal-submit {
    position: relative;
    width: 100%;
    min-height: 55px;
    border: 0;
    border-radius: 17px;
    background: linear-gradient(90deg, #38bdf8, #2563eb);
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 16px 30px rgba(37, 99, 235, .30);
    overflow: hidden;
    transition: .22s ease;
    margin-top: 3px;
}

.portal-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 44px rgba(37, 99, 235, .38);
}

.portal-submit__loader {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

.portal-submit__loader i {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #fff;
    animation: portalDots .9s infinite ease-in-out;
}

.portal-submit__loader i:nth-child(2) {
    animation-delay: .15s;
}

.portal-submit__loader i:nth-child(3) {
    animation-delay: .3s;
}

.portal-submit.is-loading .portal-submit__text {
    opacity: 0;
}

.portal-submit.is-loading .portal-submit__loader {
    display: flex;
}

.portal-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 16px;
}

.portal-links a {
    color: #93c5fd;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
}

.portal-note {
    margin-top: 16px;
    border-top: 1px solid rgba(255,255,255,.10);
    padding-top: 14px;
    color: var(--login-soft);
    line-height: 1.48;
    font-size: 12px;
}

.portal-loading {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, .74);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
}

.portal-loading.is-active {
    display: flex;
}

.portal-loading > div {
    width: min(420px, calc(100% - 34px));
    border: 1px solid rgba(56, 189, 248, .24);
    background: rgba(15, 23, 42, .82);
    border-radius: 26px;
    padding: 26px;
    text-align: center;
    box-shadow: 0 30px 90px rgba(0,0,0,.55);
}

.portal-loading span {
    color: #7dd3fc;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .10em;
}

.portal-loading strong {
    display: block;
    margin-top: 12px;
    color: #fff;
    font-size: 21px;
}

.portal-loading p {
    color: var(--login-muted);
    line-height: 1.5;
}

.portal-loading em {
    display: block;
    height: 9px;
    border-radius: 999px;
    background: linear-gradient(90deg, #38bdf8, #2563eb);
    animation: portalProgress 1.4s infinite ease-in-out;
}

@keyframes portalFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-16px) scale(1.04); }
}

@keyframes portalDots {
    0%, 80%, 100% { transform: scale(.65); opacity: .55; }
    40% { transform: scale(1); opacity: 1; }
}

@keyframes portalProgress {
    0% { transform: scaleX(.25); transform-origin: left; opacity: .65; }
    50% { transform: scaleX(1); opacity: 1; }
    100% { transform: scaleX(.25); transform-origin: right; opacity: .65; }
}

@media (min-width: 1180px) and (max-height: 760px) {
    .portal-shell {
        width: min(1040px, calc(100% - 38px));
        padding: 18px 0;
        gap: 22px;
    }

    .portal-showcase {
        min-height: 455px;
        padding: 30px 34px;
    }

    .portal-showcase h1 {
        font-size: 45px;
    }

    .portal-showcase p {
        font-size: 14px;
        line-height: 1.6;
    }

    .portal-metrics {
        margin-top: 20px;
    }

    .portal-pill-list {
        margin-top: 20px;
    }

    .portal-frase {
        margin-top: 22px;
    }

    .portal-card {
        padding: 28px;
    }
}

@media (max-width: 980px) {
    .portal-shell {
        grid-template-columns: 1fr;
        padding: 24px 0;
    }

    .portal-showcase {
        min-height: auto;
    }
}

@media (max-width: 620px) {
    .portal-shell {
        width: min(100% - 22px, 1180px);
    }

    .portal-showcase,
    .portal-card {
        border-radius: 24px;
        padding: 24px;
    }

    .portal-showcase h1 {
        font-size: 36px;
    }

    .portal-metrics,
    .portal-selector {
        grid-template-columns: 1fr;
    }
}

/* FV-008: camada visual dos portais, sem impacto funcional. */
@import url("finconex-v3/portals-v3.css");
