*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --primary: #075dad;
    --primary-dark: #064b8c;
    --ink: #132238;
    --muted: #64748b;
    --line: #dbe3ec;
    --surface: #ffffff;
    --soft: #f5f8fb;
    --danger: #c92a2a;
    --danger-soft: #fff5f5;
    --radius: 10px;
    --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    color: var(--ink);
    background: var(--surface);
    font-family: var(--font);
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

a {
    color: inherit;
}

.login-page {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(440px, .92fr);
    min-height: 100vh;
    min-height: 100dvh;
}

.login-visual {
    position: relative;
    min-height: 100%;
    overflow: hidden;
    color: #fff;
    background: #071d3b url('../img/login-hrm-background.png') center / cover no-repeat;
}

.login-visual::before {
    position: absolute;
    inset: 0;
    content: "";
    background:
        linear-gradient(180deg, rgba(3, 16, 36, .18) 0%, rgba(3, 16, 36, .42) 52%, rgba(3, 16, 36, .92) 100%),
        linear-gradient(90deg, rgba(3, 16, 36, .18), transparent 70%);
}

.login-visual__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
    padding: clamp(32px, 5vw, 72px);
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 178px;
    height: 92px;
    padding: 12px 18px;
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 16px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 14px 35px rgba(3, 16, 36, .2);
}

.brand-mark img,
.mobile-brand img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.login-intro {
    max-width: 590px;
}

.login-intro__eyebrow {
    display: inline-flex;
    margin-bottom: 20px;
    padding: 7px 11px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 999px;
    color: rgba(255, 255, 255, .86);
    background: rgba(255, 255, 255, .08);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
}

.login-intro h2 {
    max-width: 550px;
    margin: 0;
    font-size: clamp(38px, 4.4vw, 62px);
    font-weight: 650;
    letter-spacing: -.045em;
    line-height: 1.04;
}

.login-intro h2 span {
    color: #62c5ff;
}

.login-intro > p {
    max-width: 540px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, .72);
    font-size: 16px;
    line-height: 1.7;
}

.secure-note {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 30px;
    color: rgba(255, 255, 255, .82);
    font-size: 13px;
}

.secure-note svg {
    flex: 0 0 auto;
    color: #62c5ff;
}

.login-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--surface);
}

.login-panel__content {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    width: min(100%, 480px);
    margin: 0 auto;
    padding: 56px 44px 36px;
}

.mobile-brand {
    display: none;
    width: 128px;
    height: 66px;
    margin-bottom: 44px;
}

.form-heading {
    margin-bottom: 32px;
}

.form-heading > span {
    display: block;
    margin-bottom: 9px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.form-heading h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(28px, 3vw, 34px);
    font-weight: 700;
    letter-spacing: -.035em;
    line-height: 1.18;
}

.form-heading p {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.form-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 22px;
    padding: 12px 14px;
    border: 1px solid #ffc9c9;
    border-radius: var(--radius);
    color: var(--danger);
    background: var(--danger-soft);
    font-size: 13px;
    line-height: 1.5;
}

.form-alert svg {
    flex: 0 0 auto;
    margin-top: 1px;
}

.form-field {
    margin-bottom: 20px;
}

.form-field label {
    display: block;
    margin-bottom: 8px;
    color: #314158;
    font-size: 13px;
    font-weight: 600;
}

.form-field input[type="text"],
.form-field input[type="password"] {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    outline: 0;
    color: var(--ink);
    background: var(--surface);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.form-field input::placeholder {
    color: #98a6b8;
}

.form-field input:hover {
    border-color: #b6c3d1;
}

.form-field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(7, 93, 173, .12);
}

.form-field input.is-invalid {
    border-color: var(--danger);
    background: var(--danger-soft);
}

.field-error {
    margin: 7px 0 0;
    color: var(--danger);
    font-size: 12px;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 48px !important;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 7px;
    display: grid;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    place-items: center;
    transform: translateY(-50%);
    color: var(--muted);
    background: transparent;
    cursor: pointer;
}

.password-toggle:hover {
    color: var(--ink);
    background: var(--soft);
}

.password-toggle:focus-visible,
.login-button:focus-visible,
.help-text a:focus-visible {
    outline: 3px solid rgba(7, 93, 173, .2);
    outline-offset: 2px;
}

.password-toggle svg[hidden] {
    display: none;
}

.remember-option {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #45556b;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
}

.remember-option input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--primary);
}

.login-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 50px;
    margin-top: 26px;
    border: 0;
    border-radius: var(--radius);
    color: #fff;
    background: var(--primary);
    box-shadow: 0 9px 24px rgba(7, 93, 173, .2);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.login-button:hover {
    background: var(--primary-dark);
    box-shadow: 0 11px 28px rgba(7, 93, 173, .27);
    transform: translateY(-1px);
}

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

.login-button:disabled {
    opacity: .7;
    box-shadow: none;
    cursor: wait;
    transform: none;
}

.help-text {
    margin: 28px 0 0;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

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

.help-text a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.login-panel footer {
    padding: 20px 44px;
    color: #8a98aa;
    font-size: 11px;
    text-align: center;
}

@media (max-width: 980px) {
    .login-page {
        grid-template-columns: minmax(320px, .8fr) minmax(420px, 1.2fr);
    }

    .login-visual__inner {
        padding: 40px 34px;
    }

    .login-intro h2 {
        font-size: 38px;
    }

    .login-intro > p {
        font-size: 14px;
    }
}

@media (max-width: 760px) {
    body {
        background: var(--soft);
    }

    .login-page {
        display: block;
    }

    .login-visual {
        display: none;
    }

    .login-panel {
        min-height: 100vh;
        min-height: 100dvh;
        background: var(--soft);
    }

    .login-panel__content {
        width: min(100%, 500px);
        padding: 40px 30px 30px;
    }

    .mobile-brand {
        display: block;
    }
}

@media (max-width: 480px) {
    .login-panel__content {
        justify-content: flex-start;
        padding: 28px 22px 24px;
    }

    .mobile-brand {
        width: 112px;
        height: 58px;
        margin-bottom: 34px;
    }

    .form-heading {
        margin-bottom: 27px;
    }

    .form-heading h1 {
        font-size: 28px;
    }

    .login-panel footer {
        padding: 18px 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
