/* Telas de login (cliente /login e admin /login/admin).
   Cores do tema sazonal chegam por variáveis (frutag_login_visual_style). */

:root {
    --lg-painel: linear-gradient(145deg, #0a5c58 0%, #08A9A1 58%, #2ec4b8 100%);
    --lg-destaque: #08A9A1;
    --lg-destaque-2: #07807a;
    --lg-anel: rgba(8, 169, 161, 0.18);
    --lg-ink: #0f1f1e;
    --lg-muted: #5b6b6a;
    --lg-line: #e1e8e7;
    --lg-bg: #f3f6f6;
    --lg-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }

body.lg {
    margin: 0;
    font-family: var(--lg-font);
    color: var(--lg-ink);
    background: var(--lg-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.lg svg {
    width: 20px; height: 20px;
    fill: none; stroke: currentColor; stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round;
    flex-shrink: 0;
}

.lg-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}

/* ---------- Painel da marca ---------- */

.lg-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    padding: 44px clamp(40px, 5vw, 80px);
    background: var(--lg-painel);
    color: #fff;
}
.lg-brand > * { position: relative; z-index: 1; }

.lg-brand::before {
    content: '';
    position: absolute;
    width: 680px; height: 680px;
    top: -260px; right: -240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, 0) 68%);
}
.lg-brand::after {
    content: '';
    position: absolute;
    width: 460px; height: 460px;
    left: -170px; bottom: -200px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .18);
    box-shadow: 0 0 0 70px rgba(255, 255, 255, .045), 0 0 0 140px rgba(255, 255, 255, .03);
}
.lg-brand__grid {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .22) 1px, transparent 1px);
    background-size: 24px 24px;
    -webkit-mask-image: linear-gradient(160deg, transparent 15%, #000 55%, transparent 90%);
    mask-image: linear-gradient(160deg, transparent 15%, #000 55%, transparent 90%);
    opacity: .55;
}
.lg-brand > .lg-neve {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.lg-brand__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lg-brand__logo { display: block; height: 42px; width: auto; }

.lg-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .25);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.lg-pill::before {
    content: '';
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .25);
}

.lg-brand__body { max-width: 560px; }
.lg-headline {
    margin: 0;
    font-size: clamp(32px, 3.3vw, 50px);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -.035em;
}
.lg-lead {
    margin: 18px 0 0;
    max-width: 470px;
    font-size: 17px;
    line-height: 1.6;
    color: rgba(255, 255, 255, .86);
}

.lg-features {
    list-style: none;
    margin: 36px 0 0;
    padding: 0;
    display: grid;
    gap: 14px;
}
.lg-feature {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 15px;
    font-weight: 500;
}
.lg-feature__icon {
    display: grid;
    place-items: center;
    width: 42px; height: 42px;
    border-radius: 13px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .24);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.lg-brand__foot {
    font-size: 12px;
    letter-spacing: .06em;
    color: rgba(255, 255, 255, .7);
}

/* ---------- Coluna do formulário ---------- */

.lg-main {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 88px 24px 40px;
}

.lg-langs {
    position: absolute;
    top: 22px; right: 24px;
    z-index: 2;
    display: flex;
    gap: 4px;
    padding: 4px;
    margin: 0;
    list-style: none;
    background: #fff;
    border: 1px solid var(--lg-line);
    border-radius: 999px;
    box-shadow: 0 4px 14px -6px rgba(15, 31, 30, .15);
}
.lg-langs a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px 5px 6px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--lg-muted);
    text-decoration: none;
    transition: background .15s, color .15s;
}
.lg-langs a:hover { background: var(--lg-bg); color: var(--lg-ink); }
.lg-langs a.is-active { background: var(--lg-ink); color: #fff; }
.lg-langs img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; }

.lg-card {
    width: 100%;
    max-width: 430px;
    padding: 40px 38px 34px;
    background: #fff;
    border: 1px solid var(--lg-line);
    border-radius: 24px;
    box-shadow: 0 1px 2px rgba(15, 31, 30, .04), 0 28px 56px -18px rgba(15, 31, 30, .16);
    animation: lg-entrada .55s cubic-bezier(.2, .7, .2, 1) both;
}
.lg-card__logo { display: none; height: 40px; width: auto; margin: 0 auto 26px; }

.lg-title {
    margin: 0;
    font-size: 27px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -.025em;
}
.lg-sub {
    margin: 6px 0 28px;
    font-size: 15px;
    color: var(--lg-muted);
}

.lg-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0 0 22px;
    padding: 13px 15px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.45;
}
.lg-alert[hidden] { display: none; }
.lg-alert strong { display: block; margin-bottom: 2px; }
.lg-alert--erro { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.lg-alert--ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }

.lg-field { margin-bottom: 18px; }
.lg-label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 600;
    color: #27403e;
}
.lg-input-wrap { position: relative; }
.lg-input-wrap > svg {
    position: absolute;
    left: 15px; top: 50%;
    width: 18px; height: 18px;
    transform: translateY(-50%);
    color: #8c9b9a;
    pointer-events: none;
    transition: color .15s;
}
.lg-input-wrap:focus-within > svg { color: var(--lg-destaque); }

.lg-input {
    width: 100%;
    height: 52px;
    padding: 0 16px 0 45px;
    border: 1.5px solid var(--lg-line);
    border-radius: 14px;
    background: #f8fafa;
    font: inherit;
    font-size: 15px;
    color: var(--lg-ink);
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.lg-input::placeholder { color: #a3afae; }
.lg-input:hover { border-color: #cdd8d7; }
.lg-input:focus {
    outline: none;
    background: #fff;
    border-color: var(--lg-destaque);
    box-shadow: 0 0 0 4px var(--lg-anel);
}
.lg-input--senha { padding-right: 50px; }

.lg-eye {
    position: absolute;
    right: 6px; top: 50%;
    display: grid;
    place-items: center;
    width: 40px; height: 40px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #8c9b9a;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background .15s, color .15s;
}
.lg-eye:hover { background: var(--lg-bg); color: var(--lg-ink); }
.lg-eye:focus-visible { outline: 2px solid var(--lg-destaque); outline-offset: 1px; }
.lg-eye .lg-eye__off,
.lg-eye[aria-pressed="true"] .lg-eye__on { display: none; }
.lg-eye[aria-pressed="true"] .lg-eye__off { display: block; }

.lg-captcha {
    display: flex;
    justify-content: center;
    min-height: 78px;
    margin: 22px 0 0;
}

.lg-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 54px;
    margin-top: 22px;
    border: 0;
    border-radius: 14px;
    background: var(--lg-destaque);
    background: linear-gradient(135deg, var(--lg-destaque) 0%, var(--lg-destaque-2) 100%);
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .01em;
    cursor: pointer;
    box-shadow: 0 12px 26px -12px var(--lg-destaque-2);
    transition: transform .15s, box-shadow .15s, filter .15s;
}
.lg-btn:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 16px 30px -12px var(--lg-destaque-2); }
.lg-btn:active { transform: translateY(0); }
.lg-btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--lg-anel); }
.lg-btn svg { transition: transform .2s; }
.lg-btn:hover svg { transform: translateX(3px); }

.lg-btn.is-loading { pointer-events: none; }
.lg-btn.is-loading > * { visibility: hidden; }
.lg-btn.is-loading::after {
    content: '';
    position: absolute;
    width: 22px; height: 22px;
    border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    animation: lg-giro .7s linear infinite;
}

.lg-links {
    margin-top: 22px;
    text-align: center;
    font-size: 14px;
}
.lg-link {
    color: var(--lg-destaque-2);
    font-weight: 600;
    text-decoration: none;
}
.lg-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.lg-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid var(--lg-line);
    font-size: 12.5px;
    color: var(--lg-muted);
}
.lg-secure svg { width: 15px; height: 15px; color: var(--lg-destaque); }

.lg-foot {
    display: none;
    margin-top: 28px;
    font-size: 11.5px;
    letter-spacing: .05em;
    text-align: center;
    color: var(--lg-muted);
}

/* ---------- Aviso (popup de golpes) ---------- */

.lg-dialog {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(10, 20, 20, .55);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    animation: lg-fade .25s ease both;
}
.lg-dialog[hidden] { display: none; }
.lg-dialog__box {
    position: relative;
    padding: 12px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .45);
    animation: lg-entrada .35s cubic-bezier(.2, .7, .2, 1) both;
}
.lg-dialog__box img {
    display: block;
    width: min(360px, 80vw);
    height: auto;
    border-radius: 12px;
}
.lg-dialog__close {
    position: absolute;
    top: -14px; right: -14px;
    display: grid;
    place-items: center;
    width: 38px; height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--lg-ink);
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
    transition: transform .15s;
}
.lg-dialog__close:hover { transform: rotate(90deg); }

@keyframes lg-entrada { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes lg-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lg-giro { to { transform: rotate(360deg); } }

/* ---------- Responsivo ---------- */

@media (max-width: 960px) {
    .lg-shell { grid-template-columns: minmax(0, 1fr); }
    .lg-brand { display: none; }
    .lg-main { justify-content: flex-start; padding: 84px 16px 28px; }
    .lg-main::before {
        content: '';
        position: absolute;
        inset: 0 0 auto 0;
        height: 260px;
        background: var(--lg-painel);
        border-radius: 0 0 32px 32px;
    }
    .lg-card { position: relative; }
    .lg-card__logo { display: block; }
    .lg-title, .lg-sub { text-align: center; }
    .lg-foot { display: block; }
}
@media (max-width: 420px) {
    .lg-card { padding: 30px 20px 26px; border-radius: 20px; }
    .lg-title { font-size: 23px; }
    .lg-langs a span { display: none; }
    .lg-langs a { padding: 5px; }
    .lg-captcha .g-recaptcha { transform: scale(.9); transform-origin: center top; }
    .lg-captcha { min-height: 72px; }
}
@media (max-width: 350px) {
    .lg-captcha .g-recaptcha { transform: scale(.8); }
    .lg-captcha { min-height: 64px; }
}

@media (prefers-reduced-motion: reduce) {
    .lg *, .lg *::before, .lg *::after { animation: none !important; transition: none !important; }
}
