.password-field {
    position: relative;
    display: block;
}

.auth:not(.login-page) .auth-form label > input {
    margin-top: 9px;
}

.password-field input {
    padding-right: 82px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 9px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 6px;
    width: 34px;
    height: 32px;
    padding: 0;
    background: transparent;
    color: var(--orange2);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    background: var(--surface-2);
    outline: none;
}

.forgot-password {
    display: block;
    margin: -8px 0 16px;
    color: var(--orange2);
    text-align: right;
    text-decoration: none;
}

/* Farol do Portal do Cliente: decorativo, leve e alinhado à identidade LuminaTec. */
.auth-showcase::before,
.auth-showcase::after {
    content: none !important;
}

.portal-lighthouse {
    position: absolute !important;
    z-index: 0 !important;
    right: clamp(18px, 3vw, 44px);
    bottom: 22px;
    width: min(38vw, 430px);
    height: min(56vh, 470px);
    pointer-events: none;
    isolation: isolate;
}

.lighthouse-halo {
    position: absolute;
    right: 12px;
    bottom: 46px;
    width: 190px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(255, 145, 55, .16), transparent 68%);
    filter: blur(8px);
}

.lighthouse-beam {
    position: absolute;
    z-index: -1;
    right: 82px;
    bottom: 250px;
    width: min(34vw, 390px);
    height: 155px;
    transform-origin: 100% 50%;
    clip-path: polygon(100% 43%, 0 0, 0 100%, 100% 57%);
    background: linear-gradient(90deg, transparent 0%, rgba(255, 178, 92, .08) 32%, rgba(255, 211, 153, .42) 100%);
    filter: blur(1px);
    animation: portal-lighthouse-sweep 7.5s cubic-bezier(.45, 0, .55, 1) infinite;
}

.lighthouse-circuit {
    position: absolute;
    z-index: 0;
    left: 55px;
    top: 70px;
    width: 260px;
    height: 150px;
    overflow: visible;
    opacity: .16;
    filter: drop-shadow(0 0 7px rgba(255, 136, 43, .2));
    animation: portal-circuit-panel 7.5s cubic-bezier(.45, 0, .55, 1) infinite;
}

.circuit-traces path {
    stroke: #ffb16d;
    stroke-width: 2.25;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
    animation: portal-circuit-flow 7.5s cubic-bezier(.45, 0, .55, 1) infinite;
}

.circuit-nodes circle {
    fill: #ffd3a1;
    stroke: rgba(255, 139, 45, .5);
    stroke-width: 5;
    opacity: .25;
    transform-box: fill-box;
    transform-origin: center;
    animation: portal-circuit-node 7.5s ease-in-out infinite;
}

.circuit-core rect { fill: rgba(19, 21, 25, .82); stroke: #ff8b2d; stroke-width: 2; }
.circuit-core path { fill: none; stroke: #ffc27f; stroke-width: 2; stroke-linecap: round; }

.circuit-traces path:nth-child(2),.circuit-traces path:nth-child(5),.circuit-nodes circle:nth-child(2),.circuit-nodes circle:nth-child(5) { animation-delay: .18s; }
.circuit-traces path:nth-child(3),.circuit-traces path:nth-child(6),.circuit-nodes circle:nth-child(3),.circuit-nodes circle:nth-child(6) { animation-delay: .32s; }

.lighthouse-tower {
    position: absolute;
    right: 35px;
    bottom: 0;
    width: 94px;
    height: 330px;
    filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .4)) drop-shadow(0 0 1px rgba(255, 151, 67, .7));
    transform: scale(1.14);
    transform-origin: center bottom;
}

.lighthouse-roof {
    position: absolute;
    z-index: 4;
    top: 0;
    left: 18px;
    width: 58px;
    height: 24px;
    background: linear-gradient(145deg, #ff9a45, #5a3b29 42%, #24272d 74%);
    clip-path: polygon(50% 0, 100% 78%, 92% 100%, 8% 100%, 0 78%);
}

.lighthouse-roof::after {
    content: '';
    position: absolute;
    left: 27px;
    top: -9px;
    width: 4px;
    height: 12px;
    border-radius: 3px;
    background: #656a74;
}

.lighthouse-lantern {
    position: absolute;
    z-index: 3;
    top: 20px;
    left: 23px;
    width: 48px;
    height: 45px;
    border: 3px solid #8b674b;
    border-radius: 5px 5px 2px 2px;
    background: repeating-linear-gradient(90deg, transparent 0 10px, rgba(22, 24, 28, .72) 10px 13px), linear-gradient(#ffd59d, #ff8a21);
    box-shadow: inset 0 0 14px rgba(255, 244, 211, .7), 0 0 26px rgba(255, 129, 31, .62);
}

.lighthouse-lantern span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #fff4d8;
    box-shadow: 0 0 0 7px rgba(255, 190, 103, .2), 0 0 24px 10px rgba(255, 137, 35, .54);
    transform: translate(-50%, -50%);
    animation: portal-lighthouse-glow 2.8s ease-in-out infinite;
}

.lighthouse-balcony {
    position: absolute;
    z-index: 4;
    top: 62px;
    left: 12px;
    width: 70px;
    height: 10px;
    border-radius: 2px;
    background: linear-gradient(#d18a51 0 3px, #3d332d 3px);
    box-shadow: 0 4px 0 -1px rgba(255, 127, 25, .35);
}

.lighthouse-body {
    position: absolute;
    top: 70px;
    left: 20px;
    width: 55px;
    height: 238px;
    clip-path: polygon(16% 0, 84% 0, 100% 100%, 0 100%);
    background: linear-gradient(90deg, #292c32 0%, #747a84 42%, #3d424b 67%, #17191e 100%);
    border-top: 1px solid rgba(255, 255, 255, .14);
}

.lighthouse-body::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(165deg, transparent 0 42px, rgba(255, 122, 24, .34) 43px 64px, transparent 65px 96px);
}

.lighthouse-body i {
    position: absolute;
    z-index: 1;
    left: calc(50% - 3px);
    width: 7px;
    height: 11px;
    border-radius: 5px 5px 2px 2px;
    background: #ff9b42;
    box-shadow: 0 0 10px rgba(255, 133, 36, .48);
}

.lighthouse-body i:nth-child(1) { top: 45px; }
.lighthouse-body i:nth-child(2) { top: 111px; }
.lighthouse-body i:nth-child(3) { top: 177px; }

.lighthouse-base {
    position: absolute;
    left: 8px;
    bottom: 10px;
    width: 80px;
    height: 18px;
    border-radius: 50% 50% 5px 5px;
    background: linear-gradient(90deg, #0b0c0e, #32353b 48%, #101114);
}

@keyframes portal-lighthouse-sweep {
    0%, 100% { opacity: .2; transform: rotate(-20deg); }
    44%, 56% { opacity: .9; transform: rotate(17deg); }
}

@keyframes portal-lighthouse-glow {
    0%, 100% { opacity: .82; transform: translate(-50%, -50%) scale(.92); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}

@keyframes portal-circuit-panel {
    0%, 25%, 74%, 100% { opacity: .1; filter: drop-shadow(0 0 3px rgba(255, 136, 43, .08)); }
    42%, 57% { opacity: .88; filter: drop-shadow(0 0 10px rgba(255, 136, 43, .42)); }
}

@keyframes portal-circuit-flow {
    0%, 27% { opacity: .2; stroke: #a86737; }
    44%, 62% { opacity: 1; stroke: #ffd09f; }
    74%, 100% { opacity: .12; stroke: #ff9b4a; }
}

@keyframes portal-circuit-node {
    0%, 31%, 72%, 100% { opacity: .18; transform: scale(.75); }
    46%, 58% { opacity: 1; transform: scale(1); }
}

@media (max-width: 1000px) {
    .portal-lighthouse {
        right: 28px;
        bottom: 8px;
        width: 310px;
        height: 300px;
        transform: scale(.72);
        transform-origin: right bottom;
    }

    .lighthouse-circuit {
        left: 20px;
        top: 78px;
        width: 190px;
        height: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lighthouse-beam,
    .lighthouse-lantern span,
    .lighthouse-circuit,
    .circuit-traces path,
    .circuit-nodes circle {
        animation: none;
    }

    .lighthouse-beam {
        opacity: .38;
        transform: rotate(-4deg);
    }

    .lighthouse-circuit { opacity: .42; filter: drop-shadow(0 0 4px rgba(255, 136, 43, .16)); }
    .circuit-traces path { opacity: .7; }
    .circuit-nodes circle { opacity: .72; transform: none; }
}

/* Login cinematográfico: cenário é imagem; todo o conteúdo permanece HTML real. */
.login-page {
    position: relative;
    isolation: isolate;
    grid-template-columns: minmax(0, 1.45fr) minmax(390px, .72fr);
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    background: #06101f url('images/portal-login-lighthouse-v3-no-beam.png') center center / cover no-repeat;
}

.login-page::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 9, 20, .3) 0%, rgba(2, 9, 20, .08) 47%, rgba(2, 9, 20, .54) 70%, rgba(2, 9, 20, .86) 100%),
        linear-gradient(0deg, rgba(1, 6, 14, .76) 0%, transparent 32%, rgba(1, 6, 14, .22) 100%);
}

.login-page::after {
    content: none;
}

.login-stars {
    position: absolute;
    z-index: 0;
    inset: 0 0 52% 0;
    pointer-events: none;
    transform-origin: center top;
}

/* Alguns pontos ganham quatro raios curtos, como um brilho de lente.
   Permanecem pequenos para não competir com o formulário e o farol. */
.login-stars::before,
.login-stars::after {
    content: "";
    position: absolute;
    width: 15px;
    height: 15px;
    opacity: .18;
    background:
        linear-gradient(90deg, transparent 0 43%, rgba(255,255,255,.92) 49% 51%, transparent 57% 100%),
        linear-gradient(0deg, transparent 0 43%, rgba(255,255,255,.92) 49% 51%, transparent 57% 100%),
        radial-gradient(circle, #fff 0 8%, rgba(255,225,195,.72) 12%, transparent 34%);
    filter: drop-shadow(0 0 3px rgba(255, 196, 137, .42));
    transform: translate(-50%, -50%) scale(.58);
    animation: login-cross-sparkle 6.8s ease-in-out infinite;
}

.stars-a::before { left: 22%; top: 18%; animation-delay: -1.2s; }
.stars-a::after  { left: 68%; top: 30%; width: 11px; height: 11px; animation-delay: -4.6s; }
.stars-b::before { left: 46%; top: 10%; width: 18px; height: 18px; animation-delay: -3.3s; }
.stars-b::after  { left: 87%; top: 25%; width: 13px; height: 13px; animation-delay: -.4s; }
.stars-c::before { left: 34%; top: 38%; width: 10px; height: 10px; animation-delay: -5.4s; }
.stars-c::after  { left: 78%; top: 13%; width: 12px; height: 12px; animation-delay: -2.1s; }

.stars-a {
    background-image:
        radial-gradient(circle at 8% 24%, rgba(255,255,255,.95) 0 1px, transparent 1.8px),
        radial-gradient(circle at 27% 31%, rgba(255,255,255,.8) 0 .8px, transparent 1.6px),
        radial-gradient(circle at 51% 27%, rgba(255,255,255,.78) 0 .8px, transparent 1.5px),
        radial-gradient(circle at 74% 24%, rgba(255,255,255,.9) 0 1px, transparent 1.8px),
        radial-gradient(circle at 94% 34%, rgba(255,255,255,.82) 0 .8px, transparent 1.5px);
    filter: drop-shadow(0 0 3px rgba(255, 198, 139, .45));
    animation: login-stars-a 4.8s ease-in-out infinite alternate;
}

.stars-b {
    background-image:
        radial-gradient(circle at 17% 11%, rgba(255,209,158,.95) 0 1.2px, transparent 2px),
        radial-gradient(circle at 39% 15%, rgba(255,240,216,.94) 0 1px, transparent 1.8px),
        radial-gradient(circle at 63% 9%, rgba(255,191,125,.94) 0 1.1px, transparent 2px),
        radial-gradient(circle at 86% 13%, rgba(255,222,186,.9) 0 1.2px, transparent 2px);
    filter: drop-shadow(0 0 4px rgba(255, 175, 102, .5));
    animation: login-stars-b 6.2s ease-in-out -2.4s infinite alternate;
}

.stars-c {
    background-image:
        radial-gradient(circle at 12% 38%, rgba(214,231,255,.9) 0 .7px, transparent 1.4px),
        radial-gradient(circle at 33% 7%, rgba(255,255,255,.86) 0 .7px, transparent 1.4px),
        radial-gradient(circle at 58% 36%, rgba(255,226,194,.88) 0 .8px, transparent 1.5px),
        radial-gradient(circle at 69% 19%, rgba(224,237,255,.88) 0 .7px, transparent 1.4px),
        radial-gradient(circle at 91% 6%, rgba(255,255,255,.82) 0 .7px, transparent 1.4px);
    filter: drop-shadow(0 0 2px rgba(210, 229, 255, .4));
    animation: login-stars-c 3.9s ease-in-out -1.1s infinite alternate;
}

@keyframes login-stars-a {
    0%, 100% { opacity: .14; filter: drop-shadow(0 0 1px rgba(255, 198, 139, .2)); }
    46% { opacity: .8; filter: drop-shadow(0 0 6px rgba(255, 198, 139, .68)); }
}

@keyframes login-stars-b {
    0%, 100% { opacity: .78; filter: drop-shadow(0 0 6px rgba(255, 175, 102, .66)); }
    54% { opacity: .1; filter: drop-shadow(0 0 1px rgba(255, 175, 102, .16)); }
}

@keyframes login-stars-c {
    0%, 18% { opacity: .12; transform: scale(.998); }
    62% { opacity: .66; transform: scale(1); }
    100% { opacity: .28; transform: scale(.999); }
}

@keyframes login-cross-sparkle {
    0%, 22%, 100% {
        opacity: .08;
        transform: translate(-50%, -50%) scale(.46) rotate(0deg);
        filter: drop-shadow(0 0 1px rgba(255, 196, 137, .15));
    }
    42% {
        opacity: .34;
        transform: translate(-50%, -50%) scale(.78) rotate(2deg);
    }
    52% {
        opacity: .72;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        filter: drop-shadow(0 0 6px rgba(255, 215, 176, .58));
    }
    64% {
        opacity: .24;
        transform: translate(-50%, -50%) scale(.64) rotate(-2deg);
    }
}

.login-page .auth-showcase {
    min-width: 0;
    padding: clamp(34px, 4.5vw, 72px);
    background: transparent;
    justify-content: space-between;
}

.login-page .login-brand {
    align-self: flex-start;
    font-size: clamp(25px, 2.2vw, 34px);
    text-shadow: 0 2px 18px rgba(0, 0, 0, .65);
}

.login-page .login-brand .brand-mark {
    width: 46px;
    height: 46px;
    object-fit: contain;
    background: transparent;
    border-radius: 0;
}

.login-message {
    width: min(500px, 72%);
    margin-top: auto;
    margin-bottom: auto;
    text-shadow: 0 2px 22px rgba(0, 0, 0, .72);
}

.login-message .eyebrow {
    font-size: 12px;
    letter-spacing: 4px;
}

.login-page .login-message h1 {
    margin: 15px 0 18px;
    font: 500 clamp(40px, 4.6vw, 72px)/.98 Outfit, sans-serif;
    letter-spacing: -.035em;
}

.login-page .login-message h1 strong {
    color: #ff7a18;
    font-weight: 700;
}

.login-accent {
    display: block;
    width: 74px;
    height: 3px;
    margin: 22px 0;
    border-radius: 99px;
    background: linear-gradient(90deg, #ff6a00, #ffb04e);
    box-shadow: 0 0 18px rgba(255, 112, 12, .45);
}

.login-page .login-message > p:not(.eyebrow) {
    max-width: 430px;
    margin: 0;
    color: #f1f4f8;
    font-size: clamp(15px, 1.2vw, 18px);
    line-height: 1.65;
}

.login-benefits {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    width: min(690px, 100%);
    padding: 18px 0 4px;
    border-top: 1px solid rgba(255, 255, 255, .18);
}

.login-benefits > div {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    border-left: 1px solid rgba(255, 255, 255, .18);
}

.login-benefits > div:first-child { padding-left: 0; border-left: 0; }
.login-benefits span { color: #ff7a18; font-size: 25px; text-shadow: 0 0 18px rgba(255, 122, 24, .5); }
.login-benefits p,.login-benefits strong,.login-benefits small { display: block; margin: 0; }
.login-benefits strong { color: #fff; font-size: 14px; }
.login-benefits small { margin-top: 3px; color: #c2c8d2; font-size: 11px; white-space: nowrap; }

.auth-form-wrap {
    display: grid;
    place-items: center;
    min-width: 0;
    padding: clamp(24px, 4vw, 64px);
}

.login-page .login-card {
    width: min(430px, 100%);
    margin: 0;
    padding: clamp(30px, 3.2vw, 46px);
    border: 1px solid rgba(255, 157, 73, .48);
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(11, 24, 43, .88), rgba(3, 12, 26, .94));
    box-shadow: 0 32px 80px rgba(0, 0, 0, .52), inset 0 1px 0 rgba(255, 255, 255, .08), 0 0 40px rgba(255, 112, 16, .08);
    backdrop-filter: blur(17px) saturate(125%);
}

.login-card-heading { text-align: center; }
.login-lock {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin: 0 auto 16px;
    border: 1px solid rgba(255, 122, 24, .65);
    border-radius: 17px;
    color: #ff7a18;
    box-shadow: inset 0 0 20px rgba(255, 122, 24, .08);
}

.login-lock svg { width: 34px; height: 38px; overflow: visible; }
.login-lock .shield-outline,
.login-lock .shield-lock {
    fill: none;
    stroke: #ff7a18;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.login-lock .shield-key {
    fill: none;
    stroke: #ffb15f;
    stroke-width: 3.5;
    stroke-linecap: round;
}

.login-page .login-card h2 {
    margin: 7px 0 8px;
    font-size: clamp(29px, 2.3vw, 38px);
}

.login-page .login-card form { margin-top: 28px; }
.login-page .login-card label { color: #e7ebf2; font-size: 13px; font-weight: 500; }
.login-page .login-card input {
    height: 54px;
    margin-top: 8px;
    padding-inline: 16px;
    border-color: rgba(152, 171, 198, .36);
    border-radius: 12px;
    background: rgba(4, 17, 34, .62);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .02);
}

.login-page .login-card input:focus {
    border-color: #ff8a2c;
    outline: 3px solid rgba(255, 122, 24, .14);
}

.login-page .password-field input { padding-right: 58px; }
.login-page .forgot-password { margin: -7px 0 19px; color: #ff963f; font-size: 12px; }
.login-submit {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 56px;
    border-radius: 12px;
    background: linear-gradient(100deg, #ff6500, #ff9e21 58%, #ffd260);
    box-shadow: 0 10px 28px rgba(255, 100, 0, .26), 0 0 24px rgba(255, 151, 36, .18);
    color: #111923;
    font-size: 16px;
    transition: transform .25s ease, filter .25s ease, box-shadow .25s ease;
    animation: login-button-breathe 2.8s ease-in-out infinite;
}

.login-submit::before {
    content: '';
    position: absolute;
    z-index: -1;
    top: -70%;
    left: -42%;
    width: 34%;
    height: 240%;
    transform: rotate(22deg);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.72), transparent);
    animation: login-button-shine 3.2s cubic-bezier(.5, 0, .2, 1) infinite;
}

.login-submit span { display: inline-block; font-size: 20px; transition: transform .25s ease; }
.login-submit:hover {
    filter: saturate(1.12) brightness(1.08);
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 16px 36px rgba(255, 100, 0, .38), 0 0 34px rgba(255, 178, 66, .34);
}
.login-submit:hover span { transform: translateX(7px); }
.login-submit:active { transform: translateY(0) scale(.985); }

@keyframes login-button-shine {
    0%, 52% { left: -42%; opacity: 0; }
    60% { opacity: .92; }
    82%, 100% { left: 118%; opacity: 0; }
}

@keyframes login-button-breathe {
    0%, 100% { box-shadow: 0 10px 28px rgba(255, 100, 0, .22), 0 0 16px rgba(255, 151, 36, .12); }
    50% { box-shadow: 0 13px 34px rgba(255, 100, 0, .36), 0 0 30px rgba(255, 185, 76, .28); }
}
.login-security-note { margin: 22px 0 0; color: #8f9aab; text-align: center; font-size: 11px; }
.login-security-note span { color: #ff7a18; margin-right: 5px; }
.login-page .login-card .back-site { margin-top: 18px; color: #b4bdc9; font-size: 12px; }

@media (max-width: 1050px) {
    .login-page { grid-template-columns: 1fr minmax(370px, .8fr); }
    .login-page .auth-showcase { min-height: auto; padding: 36px; }
    .login-message { width: min(460px, 88%); }
    .login-benefits { grid-template-columns: 1fr; width: 250px; gap: 9px; border: 0; }
    .login-benefits > div { padding: 0; border: 0; }
}

@media (max-width: 760px) {
    .login-page {
        display: grid;
        grid-template-columns: 1fr;
        min-height: 100dvh;
        background-position: 44% center;
        overflow: auto;
    }
    .login-page::before { background: linear-gradient(rgba(2, 9, 20, .52), rgba(2, 9, 20, .9)); }
    .login-page .auth-showcase {
        display: flex;
        min-height: 285px;
        padding: 25px 24px 35px;
    }
    .login-page .login-brand { font-size: 23px; }
    .login-page .login-brand > span:last-child { display: block; }
    .login-page .login-brand .brand-mark { width: 38px; height: 38px; }
    .login-message { width: min(430px, 100%); margin: auto 0 0; }
    .login-page .login-message h1 { font-size: clamp(34px, 10vw, 48px); margin: 10px 0 12px; }
    .login-accent { margin: 15px 0; }
    .login-page .login-message > p:not(.eyebrow) { font-size: 14px; line-height: 1.5; }
    .login-benefits { display: none; }
    .auth-form-wrap { padding: 0 16px 32px; }
    .login-page .login-card { padding: 28px 22px; border-radius: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .login-stars,
    .login-submit,
    .login-submit::before,
    .login-stars::before,
    .login-stars::after { animation: none; }
    .login-stars { opacity: .42; }
}
