/* Login Worix — Montserrat, negro y dorado de control documental */

@font-face {
    font-family: "Montserrat";
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url("../fonts/montserrat-300.ttf") format("truetype");
}

@font-face {
    font-family: "Montserrat";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/montserrat-700.ttf") format("truetype");
}

:root {
    --login-ink: #000000;
    --login-ink-soft: #020d18;
    --login-panel: #f4f7fa;
    --login-card: #ffffff;
    --login-text: #0b1220;
    --login-muted: #6b7785;
    --login-line: #d5dde6;
    --login-accent: #c8a646;
    --login-accent-on-dark: #e6c974;
    --login-accent-soft: rgba(200, 166, 70, 0.22);
    --login-accent-dark: #8b6d1b;
    --login-font: "Montserrat", sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body.n4-login-page {
    width: 100%;
    min-height: 100%;
    margin: 0;
}

body.n4-login-page {
    min-height: 100dvh;
    overflow-x: hidden;
    background: var(--login-panel) !important;
    color: var(--login-text);
    font-family: var(--login-font);
    animation: none;
}

.n4-login-shell {
    display: grid;
    grid-template-columns: minmax(380px, 0.98fr) minmax(460px, 1.02fr);
    min-height: 100dvh;
}

.n4-login-brand {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
    padding: clamp(1.75rem, 4vw, 3.25rem);
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(90deg, rgba(2, 13, 24, 0.5) 0%, rgba(2, 13, 24, 0.24) 58%, rgba(2, 13, 24, 0.54) 100%),
        url("../images/worix-hero-login.jpg") center / cover no-repeat,
        #000;
}

.n4-login-brand__top {
    position: relative;
    z-index: 2;
}

.n4-login-brand__logo {
    display: block;
    width: min(205px, 44vw);
    height: auto;
    filter:
        drop-shadow(0 2px 2px rgba(0, 0, 0, 0.9))
        drop-shadow(0 6px 14px rgba(0, 0, 0, 0.72));
}

.n4-login-brand__content {
    position: relative;
    z-index: 2;
    max-width: 38rem;
    margin: auto 0;
    padding: 4rem 0;
}

.n4-login-brand__accent {
    display: block;
    width: 118px;
    height: 5px;
    margin: 0 0 18px 52px;
    background: var(--login-accent-on-dark);
}

.n4-login-brand__title-light {
    display: block;
    font-family: var(--login-font);
    font-size: clamp(3.2rem, 5.1vw, 5.25rem);
    font-weight: 300;
    line-height: 0.95;
    letter-spacing: -0.04em;
    color: #fff;
    text-shadow:
        0 2px 3px rgba(0, 0, 0, 0.95),
        0 7px 20px rgba(0, 0, 0, 0.82);
}

.n4-login-brand__title-bold {
    display: block;
    font-family: var(--login-font);
    font-size: clamp(3.2rem, 5.1vw, 5.25rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.01em;
    color: #fff;
    text-shadow:
        0 2px 3px rgba(0, 0, 0, 0.95),
        0 7px 20px rgba(0, 0, 0, 0.82);
}

.n4-login-brand__content p {
    max-width: 36rem;
    margin: 1.9rem 0 0;
    color: #ffffff;
    font-size: clamp(1.18rem, 1.4vw, 1.35rem);
    font-weight: 700;
    line-height: 1.55;
    text-shadow:
        0 2px 3px rgba(0, 0, 0, 1),
        0 6px 18px rgba(0, 0, 0, 1);
}

.n4-login-access {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: clamp(2rem, 5vw, 5rem);
    background: linear-gradient(155deg, #ffffff 0%, #f1f5f8 100%);
}

#formContent.n4-login-card {
    width: min(100%, 28rem);
    max-width: none;
    padding: clamp(2.15rem, 4vw, 2.75rem);
    border: 1px solid rgba(18, 191, 229, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow:
        0 24px 60px rgba(2, 13, 24, 0.12),
        0 0 0 1px rgba(18, 191, 229, 0.04);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    text-align: left;
}

.n4-login-mobile-brand {
    display: none;
    margin-bottom: 1.75rem;
}

.n4-login-mobile-brand img {
    display: block;
    width: min(140px, 48vw);
    height: auto;
    margin: 0 auto;
    filter: brightness(0);
}

.n4-login-card__header {
    margin-bottom: 2.35rem;
}

.n4-login-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.7rem;
    color: var(--login-accent-dark);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.n4-login-kicker::before {
    content: "";
    width: 1.6rem;
    height: 3px;
    background: var(--login-accent);
}

.n4-login-card__header h2 {
    display: block;
    margin: 0;
    color: var(--login-text);
    font-family: var(--login-font);
    font-size: clamp(2.05rem, 3.2vw, 2.65rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    text-align: left;
    text-transform: none;
}

.n4-login-card__header p {
    margin: 0.75rem 0 0;
    color: var(--login-muted);
    font-size: 0.96rem;
    font-weight: 300;
}

.n4-login-form {
    display: grid;
    gap: 1.45rem;
}

.n4-login-field {
    min-width: 0;
}

.n4-login-field label,
.n4-login-label-row label {
    display: block;
    margin: 0 0 0.5rem;
    color: #2a3441;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.n4-login-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0 0 0.5rem;
}

.n4-login-label-row label {
    margin: 0;
}

.n4-login-label-row a,
.n4-login-forgot {
    display: inline;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0 !important;
    border: 0;
    background: transparent;
    color: var(--login-accent-dark);
    font-family: var(--login-font);
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
}

.n4-login-label-row a:hover,
.n4-login-forgot:hover {
    color: #7a6520;
    text-decoration: underline;
}

.n4-login-control {
    position: relative;
    display: flex;
    align-items: center;
}

.n4-login-control > i {
    position: absolute;
    z-index: 1;
    left: 1rem;
    color: #8b95a5;
    font-size: 0.9rem;
    pointer-events: none;
}

.n4-login-control input[type="text"],
.n4-login-control input[type="password"] {
    display: block;
    width: 100%;
    height: 3.35rem;
    margin: 0;
    padding: 0 3rem 0 2.85rem;
    border: 1px solid var(--login-line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    color: #111111;
    font-family: var(--login-font);
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    outline: 0;
    box-shadow: 0 1px 2px rgba(2, 13, 24, 0.03);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.n4-login-control input::placeholder {
    color: #3e4854;
    font-weight: 500;
    opacity: 1;
}

.n4-login-control input:-webkit-autofill,
.n4-login-control input:-webkit-autofill:focus {
    -webkit-text-fill-color: #111111;
}

.n4-login-control input[type="text"]:focus,
.n4-login-control input[type="password"]:focus {
    border-color: var(--login-accent);
    background: #fff;
    box-shadow: 0 0 0 4px var(--login-accent-soft);
}

.n4-login-control:focus-within > i {
    color: var(--login-accent-dark);
}

.n4-login-password-toggle {
    position: absolute;
    z-index: 2;
    right: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #8b95a5;
    cursor: pointer;
}

.n4-login-password-toggle:hover,
.n4-login-password-toggle:focus-visible {
    background: #eef3f7;
    color: var(--login-text);
    outline: none;
}

.n4-login-submit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 3.25rem;
    margin: 0.55rem 0 0;
    padding: 0 1.2rem;
    border: 1px solid #000;
    border-radius: 12px;
    background: #000;
    color: #fff;
    font-family: var(--login-font);
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: none;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.n4-login-submit:hover {
    background: #111;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
    transform: translateY(-1px);
}

.n4-login-submit:active {
    transform: translateY(0) scale(0.99);
}

.n4-login-submit i {
    color: var(--login-accent-on-dark);
    transition: transform 0.16s ease;
}

.n4-login-submit:hover i {
    transform: translateX(3px);
}

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

    .n4-login-brand {
        display: none;
    }

    .n4-login-access {
        min-height: 100dvh;
        padding: 2rem 1.25rem 5rem;
        background: linear-gradient(180deg, #000 0 11.5rem, #f4f7fa 11.5rem);
    }

    #formContent.n4-login-card {
        width: min(100%, 28rem);
        padding: clamp(1.45rem, 6vw, 2.35rem);
        border: 1px solid rgba(200, 166, 70, 0.35);
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 22px 55px rgba(0, 0, 0, 0.28);
    }

    .n4-login-mobile-brand {
        display: block;
    }

    .n4-login-mobile-brand img {
        width: min(165px, 52vw);
    }

    .n4-login-card__header {
        margin-bottom: 1.75rem;
        text-align: center;
    }

    .n4-login-kicker {
        justify-content: center;
    }

    .n4-login-card__header h2 {
        text-align: center;
    }
}

@media (max-width: 420px) {
    .n4-login-access {
        justify-content: flex-start;
        padding: 1rem 0.75rem 4rem;
    }

    #formContent.n4-login-card {
        padding: 1.35rem 1.05rem;
        border-radius: 17px;
    }

    .n4-login-brand__accent {
        width: 72px;
        height: 4px;
        margin: 0 0 12px;
    }

    .n4-login-card__header h2 {
        font-size: 1.8rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .n4-login-page *,
    .n4-login-page *::before,
    .n4-login-page *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
