:root {
    --login-purple: #4938cf;
    --login-purple-hover: #3f2fc1;
    --login-ink: #29243d;
    --login-muted: #8a8990;
    --login-field: #eceff2;
    --login-wave: #edf2ff;
}

html,
body {
    min-height: 100%;
    background: #e8ebf2;
}

body {
    min-height: 100svh;
    padding: 0;
    overflow-x: hidden;
}

.login-page {
    width: 100%;
    min-height: 100svh;
    margin: 0;
    display: grid;
    grid-template-columns: minmax(0, 49.4444%) minmax(0, 50.5556%);
    gap: 0;
    overflow: hidden;
    background: #fff;
}

.product-panel {
    width: 100%;
    min-width: 0;
    min-height: 100svh;
    height: 100svh;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: url("../login-office.png") center center / cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(3, 34, 43, 0.08);
    opacity: 1;
    pointer-events: none;
}

.intro-card {
    width: min(508px, calc(100% - 56px));
    min-height: 572px;
    padding: 78px 30px 48px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    background: rgba(14, 58, 65, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    -webkit-backdrop-filter: blur(7px);
    backdrop-filter: blur(7px);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    z-index: 1;
    animation-name: sign-in-filled-left;
    animation-delay: 800ms;
    animation-duration: 3500ms;
    animation-timing-function: ease-out;
    animation-fill-mode: both;
}

.panel-eyebrow {
    margin: 0;
    font-size: 17px;
    line-height: 1.4;
    font-weight: 600;
}

.intro-card .brand-title {
    margin: 12px 0 0;
    font-size: 31px;
    line-height: 1.15;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.intro-card .brand-copy {
    max-width: none;
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.5;
}

.hero-logo {
    width: 240px;
    height: 240px;
    margin: 62px auto 0;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 12px 24px rgba(5, 34, 45, 0.2));
}

.auth-panel {
    min-width: 0;
    min-height: 100svh;
    height: 100svh;
    padding: 48px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-wave {
    width: 100%;
    height: 160px;
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 0;
    pointer-events: none;
    animation: sign-in-filled-wave 3500ms ease-out 800ms both;
}

.auth-wave path {
    fill: var(--login-wave);
}

.auth-card {
    width: min(100%, 396px);
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    position: relative;
    z-index: 1;
    animation-name: sign-in-filled;
    animation-delay: 800ms;
    animation-duration: 3500ms;
    animation-timing-function: ease-out;
    animation-fill-mode: both;
}

.card-brand {
    margin: 0 0 18px;
    gap: 16px;
}

.card-brand .brand-logo {
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
}

.card-brand .brand-name {
    margin: 0;
    color: var(--login-purple);
    font-family: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 24px;
    line-height: 28px;
    font-weight: 590;
    letter-spacing: 0;
    text-transform: capitalize;
}

.title {
    margin: 0;
    color: var(--login-ink);
    font-size: 30px;
    line-height: 1.16;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.subtitle {
    margin: 8px 0 0;
    color: var(--login-muted);
    font-size: 13px;
    line-height: 1.5;
}

.error,
.notice {
    margin-top: 18px;
    padding: 10px 12px;
    border-radius: 5px;
    font-size: 12px;
    line-height: 1.4;
}

.form {
    margin-top: 25px;
}

.field,
.field:first-of-type {
    margin-top: 16px;
}

.field:first-of-type {
    margin-top: 0;
}

.field label {
    margin-bottom: 8px;
    color: #4d4a59;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 500;
}

.field input {
    width: 100%;
    height: 40px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 5px;
    background: var(--login-field);
    color: var(--login-ink);
    font-size: 12px;
    box-shadow: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.field input::placeholder {
    color: #a7a9ae;
    opacity: 1;
}

.field input:hover {
    background: #e8ebee;
}

.field input:focus {
    border-color: rgba(73, 56, 207, 0.55);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(73, 56, 207, 0.13);
}

.field input.is-invalid,
.field input.is-invalid:hover,
.field input.is-invalid:focus {
    border-color: #ff3b3b;
    color: #ff3b3b;
    box-shadow: none;
}

.password-error {
    margin: 8px 0 0;
    color: #ff3b3b;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 400;
}

.password-wrap input {
    padding-right: 44px;
}

.password-toggle {
    right: 4px;
    width: 36px;
    min-width: 36px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #343655;
    font-weight: 400;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    border: 0;
    background: rgba(73, 56, 207, 0.08);
    color: var(--login-purple);
}

.password-toggle-icon {
    display: block;
    font-size: 18px;
    font-weight: 300;
    line-height: 1;
    font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 20;
}

.submit-btn {
    width: 100%;
    height: 48px;
    margin-top: 28px;
    border: 0;
    border-radius: 5px;
    background: var(--login-purple);
    color: #fff;
    font-size: 12px;
    line-height: 1;
    font-weight: 500;
    box-shadow: none;
    transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.submit-btn:hover {
    background: var(--login-purple-hover);
    box-shadow: 0 10px 22px rgba(73, 56, 207, 0.2);
}

.submit-btn:focus-visible {
    outline: 3px solid rgba(73, 56, 207, 0.2);
    outline-offset: 2px;
}

.sr-only {
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    position: absolute;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@keyframes sign-in-filled {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes sign-in-filled-left {
    from {
        opacity: 0.25;
        transform: scale(0.96);
        -webkit-backdrop-filter: blur(0);
        backdrop-filter: blur(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
        -webkit-backdrop-filter: blur(7px);
        backdrop-filter: blur(7px);
    }
}

@keyframes sign-in-filled-wave {
    from {
        opacity: 0;
        transform: translateY(36px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 980px) {
    body {
        padding: 0;
    }

    .login-page {
        grid-template-columns: minmax(0, 49.444%) minmax(0, 50.556%);
        min-height: 100svh;
    }

    .product-panel {
        display: flex;
        min-height: 100svh;
        height: 100svh;
    }

    .intro-card {
        width: calc(100% - 48px);
        min-height: 500px;
        padding: 64px 24px 40px;
    }

    .intro-card .brand-title {
        font-size: clamp(24px, 3.1vw, 31px);
    }

    .hero-logo {
        width: 190px;
        height: 190px;
    }

    .auth-panel {
        min-height: 100svh;
        height: 100svh;
        padding: 36px;
    }
}

@media (max-width: 860px) {
    .login-page {
        display: block;
    }

    .product-panel {
        display: none;
    }

    .auth-panel {
        min-height: 100svh;
        height: auto;
        padding: 40px 28px;
    }

    .auth-card {
        width: min(100%, 420px);
    }
}

@media (max-width: 560px) {
    .auth-panel {
        min-height: 100svh;
        padding: 32px 24px;
        justify-content: center;
    }

    .auth-card {
        padding: 0;
    }

    .card-brand {
        display: flex;
    }

    .title {
        font-size: 28px;
    }

    .auth-wave {
        height: 110px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .intro-card,
    .auth-card,
    .auth-wave {
        animation: none;
    }

    .field input,
    .submit-btn {
        transition: none;
    }
}

.has-login-error .intro-card,
.has-login-error .auth-card,
.has-login-error .auth-wave {
    animation: none;
}
