:root {
    --login-ink: #151816;
    --login-muted: #68706a;
    --login-line: #d9ddda;
    --login-page: #e9ebe8;
    --login-brand-surface: #ffffff;
    --login-form-surface: #f4f5f4;
    --login-surface: #ffffff;
    --login-white: #ffffff;
    --login-green: #66ad67;
    --login-green-dark: #225a4f;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--login-page);
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    color: var(--login-ink);
    background:
        radial-gradient(circle at 12% 10%, rgba(255, 255, 255, .92), transparent 30rem),
        linear-gradient(135deg, #eef0ed 0%, #e4e7e3 100%);
    font-family: "Hanken Grotesk", "Segoe UI", "Trebuchet MS", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

.login-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: clamp(18px, 4vw, 56px);
}

.login-card {
    width: min(880px, 100%);
    min-height: min(460px, calc(100dvh - 72px));
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    overflow: hidden;
    border: 0;
    border-radius: 18px;
    background: var(--login-surface);
    box-shadow: 0 1rem 3rem rgba(37, 48, 41, .175);
}

.login-brand-panel {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    overflow: hidden;
    padding: 2.5rem;
    color: var(--login-ink);
    background: var(--login-brand-surface);
    border-right: 1px solid #d9ddda;
}

.login-brand-heading {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(21, 24, 22, .12);
}

.login-brand-heading::after {
    position: absolute;
    width: 54px;
    height: 2px;
    left: 0;
    bottom: -1px;
    border-radius: 99px;
    background: var(--login-green-dark);
    content: "";
}

.login-eyebrow {
    color: var(--login-green);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.login-brand-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 0;
}

.login-brand-mark {
    width: 100%;
    max-width: 300px;
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: var(--login-white);
    box-shadow: none;
}

.login-brand-mark img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

.login-form-kicker {
    margin: 0 0 6px;
    color: var(--login-green);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.login-brand-footer {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #7b837d;
    font-size: .78rem;
}

.login-security-icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: var(--login-green-dark);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.login-security-dot {
    width: 6px;
    height: 6px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--login-green);
    box-shadow: 0 0 0 3px rgba(102, 173, 103, .12);
}

.login-form-panel {
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background: var(--login-form-surface);
}

@media (min-width: 768px) {
    .login-form-panel {
        padding: 2.5rem;
    }
}

.login-form-wrap {
    width: min(100%, 360px);
}

.login-form-subtitle {
    margin: 4px 0 0;
    color: var(--login-muted);
    font-size: .78rem;
    font-weight: 400;
    line-height: 1.4;
}

#form-login {
    margin-top: 14px;
}

.login-field {
    margin-bottom: 10px;
}

.login-field label {
    display: block;
    margin-bottom: 4px;
    color: #333834;
    font-size: .78rem;
    font-weight: 750;
    letter-spacing: .04em;
}

.login-field input {
    width: 100%;
    min-height: 44px;
    padding: 0 14px 0 42px;
    border: 1px solid var(--login-line);
    border-radius: 8px;
    outline: none;
    background: var(--login-white);
    color: var(--login-ink);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.login-control {
    position: relative;
}

.login-control-icon {
    position: absolute;
    z-index: 1;
    width: 18px;
    height: 18px;
    left: 14px;
    top: 50%;
    color: #7d8982;
    pointer-events: none;
    transform: translateY(-50%);
}

.login-control-icon svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.login-field input::placeholder {
    color: #9da39e;
}

.login-field input:focus {
    border-color: var(--login-green-dark);
    box-shadow: 0 0 0 4px rgba(34, 90, 79, .12);
    transform: translateY(-1px);
}

.login-password-toggle {
    width: max-content;
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 12px;
    color: var(--login-muted);
    cursor: pointer;
    font-size: .84rem;
    user-select: none;
}

.login-password-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.login-check {
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border: 1px solid #adb4ae;
    border-radius: 5px;
    background: var(--login-white);
}

.login-password-toggle input:checked + .login-check {
    border-color: var(--login-green-dark);
    background: var(--login-green-dark);
}

.login-password-toggle input:checked + .login-check::after {
    width: 8px;
    height: 4px;
    border-bottom: 2px solid #fff;
    border-left: 2px solid #fff;
    content: "";
    transform: rotate(-45deg) translateY(-1px);
}

.login-password-toggle input:focus-visible + .login-check {
    outline: 3px solid rgba(34, 90, 79, .22);
    outline-offset: 2px;
}

.login-btn {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border: 1px solid var(--login-green-dark);
    border-radius: 8px;
    background: linear-gradient(110deg, #287a57 0%, var(--login-green-dark) 100%);
    color: var(--login-white);
    cursor: pointer;
    font-weight: 750;
    transition: background .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.login-btn:hover {
    background: #17463e;
    box-shadow: 0 12px 28px rgba(0,0,0,.18);
    transform: translateY(-2px);
}

.login-btn:focus-visible {
    outline: 3px solid rgba(102,173,103,.5);
    outline-offset: 3px;
}

.login-btn:disabled {
    cursor: progress;
    opacity: .85;
    transform: none;
    box-shadow: none;
}

.login-btn.is-loading > span[aria-hidden="true"] {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: var(--login-white);
    border-radius: 50%;
    font-size: 0;
    animation: login-btn-spin .7s linear infinite;
}

@keyframes login-btn-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .login-btn.is-loading > span[aria-hidden="true"] {
        animation-duration: 2s;
    }
}

.login-alert {
    margin-top: 18px;
    padding: 13px 15px;
    border-left: 4px solid #b3261e;
    border-radius: 6px;
    background: #fff0ee;
    color: #7d1d18;
    font-size: .84rem;
    line-height: 1.45;
}

.login-support {
    margin: 10px 0 0;
    color: #929993;
    font-size: .7rem;
    line-height: 1.4;
    text-align: center;
}

.login-support-divider {
    position: relative;
    display: grid;
    place-items: center;
    margin-top: 18px;
    color: #a1aaa4;
}

.login-support-divider::before {
    position: absolute;
    width: 100%;
    height: 1px;
    background: #d5dad6;
    content: "";
}

.login-support-divider span {
    z-index: 1;
    display: grid;
    place-items: center;
    padding: 0 10px;
    background: var(--login-form-surface);
}

.login-support-divider svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

@media (max-width: 991.98px) {
    .login-shell {
        place-items: start center;
        padding: 18px;
    }

    .login-card {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .login-brand-panel {
        min-height: 357px;
        border-right: 0;
        border-bottom: 1px solid #d9ddda;
        padding: 2rem;
    }

    .login-brand-stage {
        min-height: 231px;
    }

}

@media (max-width: 600px) {
    .login-shell {
        padding: 0;
    }

    .login-card {
        border: 0;
        border-radius: 0;
    }

    .login-brand-panel,
    .login-form-panel {
        padding: 28px 22px;
    }

    .login-brand-panel {
        min-height: auto;
        gap: 28px;
    }

    .login-brand-stage {
        min-height: 161px;
    }

    .login-brand-mark {
        max-width: 280px;
    }

    .login-form-panel {
        min-height: calc(100dvh - 300px);
    }

    #form-login {
        margin-top: 14px;
    }
}

@media (max-width: 390px) {
    .login-brand-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

}

@media (max-height: 720px) and (min-width: 992px) {
    .login-shell {
        padding: 18px;
    }

    .login-brand-panel,
    .login-form-panel {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    #form-login {
        margin-top: 14px;
    }

    .login-support {
        margin-top: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
