:root {
    --login-primary: #0b88c8;
    --login-primary-dark: #086da0;
    --login-accent: #f4a100;
    --login-text: #1f2937;
    --login-muted: #6b7280;
    --login-border: rgba(148, 163, 184, .35);
    --login-card: rgba(255, 255, 255, .92);
    --login-danger: #b42318;
    --login-danger-bg: #fff4f2;
}

* {
    box-sizing: border-box;
}

body.login-page {
    min-height: 100vh;
    margin: 0;
    font-family: Nunito, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--login-text);
    background:
        linear-gradient(135deg, rgba(2, 44, 69, .90), rgba(8, 103, 151, .58)),
        url('../img/imageedit_3_5837510303.png') center / cover no-repeat fixed;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(380px, 520px);
}

.login-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: clamp(28px, 5vw, 72px);
    overflow: hidden;
}

.login-hero::before,
.login-hero::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: rgba(255, 255, 255, .10);
    filter: blur(1px);
}

.login-hero::before {
    width: 340px;
    height: 340px;
    top: 8%;
    left: 8%;
}

.login-hero::after {
    width: 220px;
    height: 220px;
    right: 12%;
    bottom: 18%;
}

.hero-content {
    position: relative;
    max-width: 660px;
    color: #fff;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(10px);
    font-size: 14px;
    margin-bottom: 20px;
}

.hero-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2dd4bf;
    box-shadow: 0 0 0 5px rgba(45, 212, 191, .15);
}

.hero-title {
    font-size: clamp(36px, 5vw, 64px);
    line-height: .96;
    font-weight: 900;
    letter-spacing: -.045em;
    margin: 0 0 18px;
}

.hero-copy {
    max-width: 540px;
    color: rgba(255, 255, 255, .84);
    font-size: clamp(16px, 1.6vw, 19px);
    line-height: 1.65;
    margin: 0;
}

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(22px, 4vw, 54px);
    background: linear-gradient(180deg, rgba(255,255,255,.68), rgba(255,255,255,.92));
    backdrop-filter: blur(18px);
}

.login-card {
    width: 100%;
    max-width: 430px;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 28px;
    padding: 34px;
    background: var(--login-card);
    box-shadow: 0 28px 80px rgba(15, 23, 42, .22);
}

.login-logo-wrap {
    text-align: center;
    margin-bottom: 26px;
}

.login-logo {
    width: min(240px, 70%);
    height: auto;
    filter: drop-shadow(0 10px 18px rgba(15, 23, 42, .12));
}

.login-title {
    margin: 20px 0 6px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.login-subtitle {
    margin: 0;
    color: var(--login-muted);
    font-size: 14px;
}

.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 14px;
    border: 1px solid rgba(180, 35, 24, .18);
    border-radius: 16px;
    color: var(--login-danger);
    background: var(--login-danger-bg);
    font-size: 14px;
    margin-bottom: 18px;
}

.form-group-modern {
    margin-bottom: 16px;
    text-align: left;
}

.form-label-modern {
    display: block;
    margin-bottom: 7px;
    color: #374151;
    font-size: 13px;
    font-weight: 800;
}

.input-shell {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.form-control-modern {
    width: 100%;
    min-height: 52px;
    border: 1px solid var(--login-border);
    border-radius: 16px;
    padding: 13px 48px;
    color: #111827;
    background: rgba(255, 255, 255, .88);
    font-size: 15px;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.form-control-modern::placeholder {
    color: #9ca3af;
}

.form-control-modern:focus {
    border-color: rgba(11, 136, 200, .75);
    background: #fff;
    box-shadow: 0 0 0 5px rgba(11, 136, 200, .13);
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transition: background .18s ease, color .18s ease;
}

.password-toggle:hover,
.password-toggle:focus {
    background: rgba(15, 23, 42, .06);
    color: #0f172a;
    outline: none;
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 10px 0 20px;
    color: var(--login-muted);
    font-size: 14px;
}

.remember-check {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    user-select: none;
}

.remember-check input {
    width: 17px;
    height: 17px;
    accent-color: var(--login-primary);
}

.login-help-inline {
    color: var(--login-primary-dark);
    font-weight: 700;
    text-decoration: none;
}

.login-help-inline:hover {
    text-decoration: underline;
}

.btn-login-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 54px;
    border: 0;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--login-primary), var(--login-primary-dark));
    box-shadow: 0 16px 30px rgba(11, 136, 200, .28);
    font-weight: 900;
    letter-spacing: .01em;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.btn-login-modern:hover,
.btn-login-modern:focus {
    transform: translateY(-1px);
    box-shadow: 0 20px 36px rgba(11, 136, 200, .34);
    filter: saturate(1.08);
    outline: none;
}

.btn-login-modern:active {
    transform: translateY(0);
}

.btn-login-modern.is-loading {
    pointer-events: none;
    opacity: .82;
}

.login-spinner {
    display: none;
    width: 17px;
    height: 17px;
    border: 2px solid rgba(255,255,255,.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: loginSpin .8s linear infinite;
}

.btn-login-modern.is-loading .login-spinner {
    display: inline-block;
}

@keyframes loginSpin {
    to { transform: rotate(360deg); }
}

.login-footer {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid rgba(148, 163, 184, .22);
    text-align: center;
}

.login-footer p {
    margin: 0 0 12px;
    color: var(--login-muted);
    font-size: 13px;
}

.login-footer a {
    color: var(--login-primary-dark);
    font-weight: 800;
}

.company-label {
    margin-top: 20px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.company-logo {
    width: 86px;
    max-width: 30%;
    margin-top: 8px;
}

.security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    color: #64748b;
    font-size: 12px;
}

.security-note svg {
    color: #16a34a;
}

@media (max-width: 991px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-hero {
        display: none;
    }

    .login-panel {
        min-height: 100vh;
        background: rgba(255,255,255,.58);
    }
}

@media (max-width: 520px) {
    body.login-page {
        background-attachment: scroll;
    }

    .login-panel {
        padding: 16px;
    }

    .login-card {
        padding: 26px 20px;
        border-radius: 22px;
    }

    .login-options {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Ajuste 2026-05-26: login visible completo sin scroll */
html,
body.login-page {
    width: 100%;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
}

body.login-page {
    min-height: 100dvh;
}

.login-shell {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
}

.login-hero,
.login-panel {
    min-height: 0;
    height: 100dvh;
    overflow: hidden;
}

.login-panel {
    padding: clamp(14px, 2.2vw, 32px);
}

.login-card {
    max-height: calc(100dvh - 32px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(20px, 2.3vw, 28px);
    border-radius: 26px;
}

.login-logo-wrap {
    margin-bottom: 18px;
}

.login-logo {
    width: min(210px, 62%);
}

.login-title {
    margin: 12px 0 4px;
    font-size: clamp(20px, 2vw, 23px);
}

.login-subtitle {
    font-size: 13px;
}

.form-group-modern {
    margin-bottom: 12px;
}

.form-label-modern {
    margin-bottom: 5px;
}

.form-control-modern {
    min-height: 48px;
    padding-top: 11px;
    padding-bottom: 11px;
}

.login-options {
    margin: 8px 0 16px;
    font-size: 13px;
}

.btn-login-modern {
    min-height: 50px;
}

.security-note {
    margin-top: 14px;
    font-size: 11px;
}

.login-footer {
    margin-top: 16px;
    padding-top: 16px;
}

.login-footer p {
    margin-bottom: 8px;
    font-size: 12px;
}

.company-label {
    margin-top: 10px;
    font-size: 10px;
}

.company-logo {
    width: 68px;
    margin-top: 5px;
}

.hero-title {
    font-size: clamp(34px, 4.4vw, 56px);
}

.hero-copy {
    font-size: clamp(14px, 1.3vw, 17px);
    line-height: 1.5;
}

@media (max-height: 760px) {
    .login-card {
        max-width: 400px;
        padding: 18px 24px;
    }

    .login-logo-wrap {
        margin-bottom: 12px;
    }

    .login-logo {
        width: min(185px, 55%);
    }

    .login-title {
        margin-top: 8px;
        font-size: 20px;
    }

    .login-subtitle,
    .security-note,
    .login-footer p {
        font-size: 11px;
    }

    .form-control-modern {
        min-height: 44px;
        border-radius: 14px;
    }

    .btn-login-modern {
        min-height: 46px;
        border-radius: 14px;
    }

    .login-footer {
        margin-top: 12px;
        padding-top: 12px;
    }

    .company-logo {
        width: 58px;
    }

    .hero-badge {
        margin-bottom: 14px;
    }

    .hero-title {
        font-size: clamp(32px, 4vw, 48px);
        margin-bottom: 12px;
    }

    .hero-copy {
        max-width: 500px;
    }
}

@media (max-width: 991px) {
    .login-panel {
        height: 100dvh;
        min-height: 0;
    }
}

@media (max-width: 520px) {
    html,
    body.login-page {
        overflow: hidden;
    }

    .login-card {
        max-height: calc(100dvh - 20px);
        padding: 18px;
    }

    .login-logo {
        width: min(180px, 64%);
    }
}
