﻿:root {
    /* Paleta institucional */
    --color-primary: #FFFFFF;
    --color-secondary-dark: #181818;
    --color-secondary-light: #B3B3B3;
    --color-secondary-dark-soft: rgba(0, 0, 0, .14);
    --color-secondary-light-soft: rgba(179, 179, 179, .18);
    /* Variables semánticas */
    --brand-black: var(--color-secondary-dark);
    --brand-black-soft: var(--color-secondary-dark);
    --brand-gray: var(--color-secondary-dark);
    --brand-border: var(--color-secondary-light);
    --white: var(--color-primary);
    --card-width: 410px;
    --shadow-card: 0 28px 70px rgba(0, 0, 0, .30), 0 8px 24px rgba(0, 0, 0, .15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

html {
    background: #101010;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    color: var(--brand-black-soft);
    background: #101010;
    font-family: "Poppins", "Segoe UI", Arial, sans-serif;
}

button,
input {
    font: inherit;
}

.login-page {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(430px, 42%);
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    background-image: linear-gradient(90deg, rgba(0, 0, 0, .20) 0%, rgba(0, 0, 0, .05) 52%, rgba(0, 0, 0, .28) 100%), url("../images/Home/ora05leftv2.png");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}

/* =========================
   ÁREA VISUAL
========================= */
.login-visual {
    position: relative;
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
    padding: clamp(34px, 3.3vw, 60px) clamp(34px, 4vw, 72px) clamp(34px, 3.3vw, 58px);
    overflow: hidden;
}

.visual-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: calc(100vh - clamp(68px, 6.6vw, 118px));
    min-height: calc(100dvh - clamp(68px, 6.6vw, 118px));
}

.brand {
    display: inline-flex;
    width: fit-content;
}

.brand-logo {
    display: block;
    width: clamp(240px, 20vw, 285px);
    max-width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 22px rgba(0, 0, 0, .45));
}

.brand-fallback {
    color: #FFFFFF;
    font-size: clamp(30px, 3vw, 48px);
    font-weight: 800;
    letter-spacing: 2px;
    text-shadow: 0 8px 24px rgba(0, 0, 0, .50);
}

    .brand-fallback span {
        color: var(--color-secondary-dark);
    }

.hero-copy {
    position: relative;
    z-index: 3;
    width: min(100%, 680px);
    margin-top: auto;
    margin-bottom: clamp(48px, 7vh, 86px);
    color: var(--white);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    margin-bottom: 18px;
    padding: 8px 15px;
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 999px;
    background: rgba(0, 0, 0, .25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.hero-copy h1 {
    margin: 0;
    color: var(--white);
    font-size: clamp(42px, 4.8vw, 76px);
    font-weight: 780;
    line-height: 1;
    letter-spacing: -3px;
    text-shadow: 0 12px 34px rgba(0, 0, 0, .58);
}

    .hero-copy h1 span {
        display: block;
        color: #B3B3B3;
    }

.hero-line {
    width: 78px;
    height: 5px;
    margin: 27px 0 20px;
    border-radius: 999px;
    background: var(--color-secondary-dark);
    box-shadow: 0 0 22px rgba(0, 0, 0, .45);
}

.hero-copy p {
    max-width: 570px;
    margin: 0;
    color: rgba(255, 255, 255, .94);
    font-size: clamp(15px, 1.15vw, 19px);
    line-height: 1.58;
    text-shadow: 0 5px 18px rgba(0, 0, 0, .55);
}

.eikos-visual-logo {
    position: absolute;
    left: clamp(34px, 4vw, 72px);
    bottom: clamp(22px, 2.4vw, 38px);
    z-index: 6;
    width: clamp(62px, 13vw, 170px);
    pointer-events: none;
}

    .eikos-visual-logo img {
        display: block;
        width: 90%;
        height: auto;
        object-fit: contain;
        filter: drop-shadow(0 8px 22px rgba(0, 0, 0, .55));
    }

/* =========================
   PANEL DERECHO
========================= */
.login-panel {
    position: relative;
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 42px clamp(34px, 4vw, 72px) 76px;
}

    .login-panel::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        pointer-events: none;
        background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, .06) 22%, rgba(255, 255, 255, .15) 100%);
    }

.login-box {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: var(--card-width);
    padding: clamp(28px, 2.2vw, 38px) clamp(26px, 2.7vw, 42px) 32px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .90);
    border-radius: 30px;
    background: linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(255, 255, 255, .94));
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(18px) saturate(118%);
    -webkit-backdrop-filter: blur(18px) saturate(118%);
}

    .login-box::before {
        content: "";
        position: absolute;
        top: 0;
        right: 32px;
        left: 32px;
        height: 2px;
        background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .90), transparent);
    }

    .login-box::after {
        content: "";
        position: absolute;
        right: -90px;
        bottom: -120px;
        width: 250px;
        height: 250px;
        z-index: -1;
        border-radius: 50%;
        pointer-events: none;
        background: var(--color-secondary-light-soft);
        filter: blur(12px);
    }

.login-banner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: 56px;
    margin: 0 0 20px;
}

    .login-banner img {
        display: block;
        width: auto;
        max-width: 205px;
        max-height: 56px;
        object-fit: contain;
        object-position: left center;
    }

    .login-banner.banner-fallback::before {
        content: "eOffice GWM Care";
        color: var(--brand-black);
        font-size: 27px;
        font-weight: 780;
        line-height: 1;
        letter-spacing: -1.5px;
    }

.login-header {
    position: relative;
    z-index: 2;
    margin: 4px 0 25px;
}

    .login-header .eyebrow {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 11px;
        color: var(--color-secondary-dark);
        font-size: 12px;
        font-weight: 800;
        letter-spacing: 1.7px;
        text-transform: uppercase;
    }

        .login-header .eyebrow::before {
            content: "";
            width: 30px;
            height: 3px;
            border-radius: 999px;
            background: var(--color-secondary-dark);
        }

    .login-header h2 {
        margin: 0 0 8px;
        color: var(--brand-black-soft);
        font-size: clamp(28px, 2.35vw, 38px);
        font-weight: 780;
        line-height: 1.08;
        letter-spacing: -1.2px;
    }

    .login-header p {
        max-width: 405px;
        margin: 0;
        color: var(--brand-gray);
        font-size: 15px;
        line-height: 1.55;
    }

/* =========================
   FORMULARIO
========================= */
.login-box form {
    position: relative;
    z-index: 2;
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #181818;
    font-size: 14px;
    font-weight: 700;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.input-icon {
    position: absolute;
    top: 50%;
    left: 17px;
    z-index: 2;
    width: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #181818;
    font-size: 17px;
    transform: translateY(-50%);
    pointer-events: none;
    transition: color .2s ease, transform .2s ease;
}

.form-control {
    display: block;
    width: 100%;
    height: 56px;
    padding: 0 50px 0 52px;
    color: var(--brand-black-soft);
    font-size: 15px;
    background: linear-gradient(180deg, #FFFFFF, #FFFFFF);
    border: 1px solid var(--brand-border);
    border-radius: 14px;
    outline: none;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .025);
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

    .form-control::placeholder {
        color: #B3B3B3;
    }

    .form-control:hover {
        border-color: #B3B3B3;
    }

    .form-control:focus {
        border-color: rgba(0, 0, 0, .75);
        background: #FFFFFF;
        box-shadow: 0 0 0 4px rgba(0, 0, 0, .11), 0 8px 18px rgba(0, 0, 0, .06);
    }

.input-wrapper:focus-within .input-icon {
    color: var(--color-secondary-dark);
    transform: translateY(-50%) scale(1.04);
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    z-index: 3;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #181818;
    background: transparent;
    border: 0;
    border-radius: 11px;
    outline: none;
    cursor: pointer;
    transform: translateY(-50%);
    transition: color .2s ease, background .2s ease;
}

    .password-toggle:hover,
    .password-toggle:focus-visible {
        color: var(--color-secondary-dark);
        background: var(--color-secondary-dark-soft);
    }

.login-button {
    position: relative;
    width: 100%;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    margin-top: 24px;
    overflow: hidden;
    color: var(--white);
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-secondary-dark) 0%, var(--color-secondary-dark) 72%, var(--color-secondary-light) 100%);
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .30), 0 0 0 1px rgba(0, 0, 0, .06);
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

    .login-button::before {
        content: "";
        position: absolute;
        top: 0;
        left: -120%;
        width: 58%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .22), transparent);
        transform: skewX(-20deg);
        transition: left .55s ease;
    }

    .login-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 18px 38px rgba(0, 0, 0, .38), 0 0 0 4px rgba(0, 0, 0, .09);
    }

        .login-button:hover::before {
            left: 150%;
        }

    .login-button:focus-visible {
        outline: 3px solid rgba(0, 0, 0, .30);
        outline-offset: 3px;
    }

    .login-button:active {
        transform: translateY(0);
    }

    .login-button:disabled {
        opacity: .72;
        cursor: not-allowed;
        transform: none;
    }

    .login-button i,
    .login-button span {
        position: relative;
        z-index: 2;
    }

.security-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 18px;
    color: #181818;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
}

    .security-message i {
        color: var(--color-secondary-dark);
    }

.login-footer {
    position: absolute;
    right: 0;
    bottom: 18px;
    left: 0;
    z-index: 3;
    padding: 0 18px;
    color: rgba(255, 255, 255, .80);
    font-size: 11px;
    line-height: 1.45;
    text-align: center;
    text-shadow: 0 3px 12px rgba(0, 0, 0, .70);
}

/* =========================
   LAPTOP
========================= */
@media (max-width: 1366px) {
    .login-page {
        grid-template-columns: minmax(0, 1fr) minmax(395px, 41%);
        background-position: 52% center;
    }

    .login-visual {
        padding: 36px 42px 34px;
    }

    .eikos-visual-logo {
        left: 42px;
        bottom: 26px;
        width: 150px;
    }

    .login-panel {
        padding: 30px 34px 64px;
    }

    .login-box {
        max-width: 400px;
        padding: 28px 32px 30px;
        border-radius: 26px;
    }

    .hero-copy h1 {
        font-size: clamp(40px, 4.7vw, 56px);
        letter-spacing: -2.4px;
    }
}

/* =========================
   TABLET
========================= */
@media (min-width: 768px) and (max-width: 1023px) {
    .login-page {
        grid-template-columns: minmax(0, 1fr) minmax(345px, 46%);
    }

    .login-visual {
        padding: 28px 27px;
    }

    .brand-logo {
        width: 190px;
    }

    .hero-copy {
        max-width: 360px;
        margin-bottom: 52px;
    }

        .hero-copy h1 {
            font-size: clamp(34px, 5.2vw, 44px);
            letter-spacing: -2px;
        }

        .hero-copy p {
            font-size: 13.5px;
        }

    .eikos-visual-logo {
        left: 27px;
        bottom: 20px;
        width: 120px;
    }

    .login-panel {
        padding: 26px 20px 56px;
    }

    .login-box {
        max-width: 390px;
        padding: 25px 24px 26px;
        border-radius: 23px;
    }

    .form-control {
        height: 49px;
    }

    .login-button {
        min-height: 50px;
    }
}

/* =========================
   MÓVIL
========================= */
@media (max-width: 767px) {
    .login-page {
        display: flex;
        flex-direction: column;
        min-height: 100dvh;
        overflow: visible;
        background: #101010;
    }

    .login-visual {
        flex: 0 0 auto;
        width: 100%;
        min-height: 0;
        aspect-ratio: 16 / 9;
        padding: clamp(16px, 4.5vw, 24px);
        background-image: linear-gradient(to top, rgba(0, 0, 0, .45), rgba(0, 0, 0, .05)), url("../images/Home/ora05leftv2.png");
        background-repeat: no-repeat;
        background-position: center center;
        background-size: cover;
    }

    .visual-content {
        width: 100%;
        height: 100%;
        min-height: 0;
    }

    .brand-logo {
        width: clamp(145px, 38vw, 215px);
    }

    .hero-copy {
        display: none;
    }

    .eikos-visual-logo {
        left: auto;
        right: 22px;
        bottom: 17px;
        width: clamp(95px, 24vw, 120px);
    }

    .login-panel {
        flex: 1 0 auto;
        min-height: auto;
        align-items: stretch;
        justify-content: flex-start;
        padding: 0 16px 24px;
        background: #101010;
    }

        .login-panel::before {
            display: none;
        }

    .login-box {
        width: 100%;
        max-width: 520px;
        margin: 10px auto 0;
        padding: 24px 22px 26px;
        border-radius: 23px;
        background: linear-gradient(145deg, #FFFFFF, #FFFFFF);
        box-shadow: 0 22px 48px rgba(0, 0, 0, .30);
    }

    .login-banner {
        min-height: 41px;
        margin-bottom: 14px;
    }

        .login-banner img {
            max-width: 148px;
            max-height: 41px;
        }

    .login-header {
        margin: 0 0 20px;
    }

        .login-header h2 {
            font-size: clamp(24px, 6.4vw, 29px);
        }

        .login-header p {
            font-size: 12.5px;
        }

    .form-control {
        height: 51px;
        font-size: 13.5px;
    }

    .login-button {
        min-height: 52px;
        margin-top: 18px;
        font-size: 14px;
    }

    .security-message {
        font-size: 10px;
    }

    .login-footer {
        position: static;
        width: 100%;
        margin-top: 20px;
        padding: 0 12px;
        font-size: 9.7px;
    }
}

@media (max-width: 430px) {
    .login-panel {
        padding-right: 12px;
        padding-left: 12px;
    }

    .login-box {
        padding: 22px 18px 23px;
        border-radius: 21px;
    }

    .form-control {
        height: 50px;
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

@supports not ((backdrop-filter: blur(10px)) or
               (-webkit-backdrop-filter: blur(10px))) {
    .login-box {
        background: rgba(255, 255, 255, .98);
    }
}
