:root {
    --lime: #92cd27;
    --lime-bright: #a8df3b;
    --lime-soft: #eff8dd;
    --forest: #173e2d;
    --forest-deep: #0e2d21;
    --ink: #18322a;
    --muted: #687871;
    --line: #e2e9df;
    --white: #ffffff;
    --cream: #fafbf5;
    --danger: #b94242;
}

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

html {
    min-height: 100%;
}

body {
    min-width: 320px;
    min-height: 100%;
    margin: 0;
    color: var(--ink);
    background: var(--cream);
    font-family: "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.is-loading {
    cursor: wait;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

button {
    color: inherit;
}

img,
svg {
    display: block;
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: 12px;
    left: 12px;
    padding: 10px 15px;
    border-radius: 8px;
    color: var(--white);
    background: var(--forest-deep);
    transform: translateY(-160%);
    transition: transform 0.2s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.login-page {
    display: grid;
    min-height: 100dvh;
    grid-template-columns: minmax(470px, 1.08fr) minmax(520px, 0.92fr);
}

.login-story {
    position: relative;
    min-height: 720px;
    overflow: hidden;
    color: var(--white);
    background: var(--forest-deep);
}

.login-story__photo,
.login-story__shade {
    position: absolute;
    inset: 0;
}

.login-story__photo {
    background-image: url("hero-smart-orchard-iot.webp");
    background-position: 58% center;
    background-size: cover;
    transform: scale(1.02);
}

.login-story__shade {
    background:
        radial-gradient(circle at 75% 32%, rgba(146, 205, 39, 0.08), transparent 31%),
        linear-gradient(135deg, rgba(14, 45, 33, 0.97) 4%, rgba(14, 45, 33, 0.82) 56%, rgba(14, 45, 33, 0.52) 100%),
        linear-gradient(0deg, rgba(14, 45, 33, 0.76), transparent 55%);
}

.login-story__shade::after {
    position: absolute;
    inset: 0;
    opacity: 0.25;
    background-image: radial-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1px);
    background-size: 25px 25px;
    content: "";
    mask-image: linear-gradient(to bottom right, black, transparent 68%);
}

.login-story__batik {
    position: absolute;
    z-index: 1;
    right: -72px;
    bottom: -92px;
    width: min(65vw, 680px);
    max-width: none;
    height: auto;
    opacity: 0.48;
    filter: saturate(0.84) brightness(1.12);
    mix-blend-mode: screen;
}

.login-story__inner {
    position: relative;
    z-index: 2;
    display: flex;
    min-height: 100%;
    padding: clamp(38px, 5vw, 72px);
    flex-direction: column;
}

.story-brand {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 12px;
}

.story-brand > img {
    width: 46px;
    height: 46px;
    padding: 3px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    object-fit: contain;
}

.story-brand > span {
    display: grid;
    gap: 2px;
}

.story-brand strong {
    font-size: 1.1rem;
    font-weight: 850;
    letter-spacing: -0.04em;
    line-height: 1;
}

.story-brand small {
    color: var(--lime-bright);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    line-height: 1;
    text-transform: uppercase;
}

.login-story__copy {
    width: min(100%, 650px);
    margin: auto 0;
    padding: 80px 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--lime-bright);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.eyebrow svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.6;
}

.login-story h1 {
    max-width: 680px;
    margin: 0 0 24px;
    font-size: clamp(3rem, 5vw, 5.35rem);
    font-weight: 760;
    letter-spacing: -0.06em;
    line-height: 1.02;
}

.login-story__copy > p {
    max-width: 590px;
    margin: 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: 1rem;
    line-height: 1.75;
}

.story-features {
    display: flex;
    margin: 34px 0 0;
    padding: 0;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
}

.story-features li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.82);
    background: rgba(14, 45, 33, 0.3);
    font-size: 0.69rem;
    font-weight: 750;
    backdrop-filter: blur(10px);
}

.story-features svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: var(--lime-bright);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.story-status {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 13px;
    padding: 13px 16px;
    border: 1px solid rgba(255, 255, 255, 0.17);
    border-radius: 15px;
    background: rgba(14, 45, 33, 0.45);
    backdrop-filter: blur(14px);
}

.story-status > span:last-child {
    display: grid;
    gap: 3px;
}

.story-status strong {
    font-size: 0.73rem;
    line-height: 1.2;
}

.story-status small {
    color: rgba(255, 255, 255, 0.57);
    font-size: 0.62rem;
}

.story-status__pulse {
    position: relative;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--lime-bright);
    box-shadow: 0 0 0 6px rgba(168, 223, 59, 0.15);
}

.story-status__pulse::after {
    position: absolute;
    inset: -5px;
    border: 1px solid rgba(168, 223, 59, 0.7);
    border-radius: 50%;
    content: "";
    animation: pulse 2s ease-out infinite;
}

.login-panel {
    position: relative;
    display: flex;
    min-height: 720px;
    padding: clamp(34px, 4vw, 62px) clamp(38px, 6vw, 90px);
    flex-direction: column;
    background:
        radial-gradient(circle at 100% 0, rgba(146, 205, 39, 0.12), transparent 27%),
        var(--cream);
}

.back-link {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 8px;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 750;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--forest);
}

.back-link svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    transition: transform 0.2s ease;
}

.back-link:hover svg {
    transform: translateX(-3px);
}

.login-panel__inner {
    width: min(100%, 480px);
    margin: auto;
    padding: 54px 0;
}

.login-heading {
    margin-bottom: 34px;
}

.login-mark {
    display: grid;
    width: 66px;
    height: 66px;
    margin-bottom: 24px;
    place-items: center;
    border: 1px solid rgba(146, 205, 39, 0.35);
    border-radius: 20px;
    background: var(--lime-soft);
}

.login-mark img {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.login-kicker {
    color: #6a9e14;
    font-size: 0.69rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.login-heading h2 {
    margin: 9px 0 13px;
    color: var(--ink);
    font-size: clamp(2.45rem, 4vw, 3.7rem);
    font-weight: 760;
    letter-spacing: -0.055em;
    line-height: 1.05;
}

.login-heading p {
    max-width: 430px;
    margin: 0;
    color: var(--muted);
    font-size: 0.87rem;
    line-height: 1.7;
}

.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 22px;
    padding: 13px 14px;
    border: 1px solid rgba(185, 66, 66, 0.2);
    border-radius: 12px;
    color: #8e3333;
    background: #fff1f1;
    font-size: 0.76rem;
    line-height: 1.5;
}

.login-alert[hidden] {
    display: none;
}

.login-alert svg {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.login-form {
    display: grid;
    gap: 21px;
}

.field {
    display: grid;
    gap: 8px;
}

.field label {
    color: var(--ink);
    font-size: 0.75rem;
    font-weight: 820;
}

.field__control {
    position: relative;
}

.field__control > svg {
    position: absolute;
    top: 50%;
    left: 17px;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #82918a;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.6;
    transform: translateY(-50%);
    pointer-events: none;
}

.field input {
    width: 100%;
    min-height: 58px;
    padding: 15px 52px 15px 50px;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.88);
    font-size: 0.86rem;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.field input::placeholder {
    color: #9aa69f;
}

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

.field input:focus {
    border-color: var(--lime);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(146, 205, 39, 0.14);
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    display: grid;
    width: 39px;
    height: 39px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 10px;
    color: #718078;
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
    transition: color 0.2s ease, background-color 0.2s ease;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    color: var(--forest);
    background: var(--lime-soft);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.password-toggle .eye-closed,
.password-toggle[aria-pressed="true"] .eye-open {
    display: none;
}

.password-toggle[aria-pressed="true"] .eye-closed {
    display: block;
}

.submit-button {
    position: relative;
    display: grid;
    width: 100%;
    min-height: 58px;
    margin-top: 4px;
    padding: 15px 24px;
    place-items: center;
    border: 0;
    border-radius: 999px;
    color: var(--forest-deep);
    background: var(--lime);
    box-shadow: 0 14px 30px rgba(112, 169, 18, 0.22);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 850;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.submit-button:hover:not(:disabled),
.submit-button:focus-visible:not(:disabled) {
    background: var(--lime-bright);
    box-shadow: 0 17px 36px rgba(112, 169, 18, 0.29);
    transform: translateY(-2px);
}

.submit-button:focus-visible,
.back-link:focus-visible,
.story-brand:focus-visible,
.password-toggle:focus-visible {
    outline: 3px solid rgba(146, 205, 39, 0.38);
    outline-offset: 4px;
}

.submit-button:disabled {
    cursor: wait;
    opacity: 0.78;
}

.submit-button__label,
.submit-button__loading {
    align-items: center;
    gap: 10px;
}

.submit-button__label {
    display: inline-flex;
}

.submit-button__label svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    transition: transform 0.2s ease;
}

.submit-button:hover .submit-button__label svg {
    transform: translateX(3px);
}

.submit-button__loading {
    display: none;
}

.submit-button__loading i {
    width: 17px;
    height: 17px;
    border: 2px solid rgba(14, 45, 33, 0.24);
    border-top-color: var(--forest-deep);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

.login-form.is-loading .submit-button__label {
    display: none;
}

.login-form.is-loading .submit-button__loading {
    display: inline-flex;
}

.security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 20px 0 0;
    color: #87948e;
    font-size: 0.67rem;
}

.security-note svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: #6b9f17;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.6;
}

.login-partners {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.login-partners > span {
    color: #89968f;
    font-size: 0.59rem;
    font-weight: 820;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-partners > div {
    display: flex;
    align-items: center;
    gap: 18px;
}

.login-partners img {
    object-fit: contain;
    filter: saturate(0.78);
}

.login-partners img:nth-child(1) {
    width: 68px;
    max-height: 34px;
}

.login-partners img:nth-child(2) {
    width: 32px;
    height: 32px;
}

.login-partners img:nth-child(3) {
    width: 86px;
    max-height: 32px;
}

@keyframes pulse {
    from {
        opacity: 0.8;
        transform: scale(0.6);
    }

    to {
        opacity: 0;
        transform: scale(1.8);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1080px) {
    .login-page {
        grid-template-columns: minmax(390px, 0.9fr) minmax(500px, 1.1fr);
    }

    .login-story__inner {
        padding: 42px;
    }

    .login-story h1 {
        font-size: clamp(2.8rem, 5.4vw, 4.5rem);
    }

    .login-panel {
        padding-inline: 54px;
    }
}

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

    .login-story {
        min-height: 430px;
    }

    .login-story__inner {
        min-height: 430px;
        padding: 34px;
    }

    .login-story__copy {
        margin: auto 0 0;
        padding: 62px 0 18px;
    }

    .login-story h1 {
        max-width: 620px;
        margin-bottom: 15px;
        font-size: clamp(2.55rem, 7vw, 4.2rem);
    }

    .story-features,
    .story-status {
        display: none;
    }

    .login-story__batik {
        right: -45px;
        bottom: -190px;
        width: 520px;
    }

    .login-panel {
        min-height: 0;
        padding: 34px max(28px, 8vw) 40px;
    }

    .login-panel__inner {
        margin: 0 auto;
        padding: 68px 0;
    }

    .login-partners {
        width: min(100%, 600px);
        margin-inline: auto;
    }
}

@media (max-width: 560px) {
    .login-story {
        min-height: 340px;
    }

    .login-story__inner {
        min-height: 340px;
        padding: 24px;
    }

    .story-brand > img {
        width: 40px;
        height: 40px;
    }

    .login-story__copy {
        padding-bottom: 0;
    }

    .eyebrow {
        margin-bottom: 12px;
        font-size: 0.61rem;
    }

    .login-story h1 {
        margin-bottom: 0;
        font-size: clamp(2.3rem, 11vw, 3.25rem);
    }

    .login-story__copy > p {
        display: none;
    }

    .login-story__batik {
        right: -110px;
        bottom: -230px;
        width: 500px;
    }

    .login-panel {
        padding: 25px 22px 34px;
    }

    .login-panel__inner {
        padding: 52px 0;
    }

    .login-heading {
        margin-bottom: 28px;
    }

    .login-mark {
        width: 58px;
        height: 58px;
        margin-bottom: 20px;
    }

    .login-mark img {
        width: 46px;
        height: 46px;
    }

    .login-heading h2 {
        font-size: clamp(2.25rem, 11vw, 3.1rem);
    }

    .field input,
    .submit-button {
        min-height: 56px;
    }

    .login-partners {
        align-items: flex-start;
        flex-direction: column;
    }

    .login-partners > div {
        width: 100%;
        justify-content: space-between;
    }
}

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