:root {
    --green: #17a350;
    --green-dark: #118844;

    --maroon: #7c133d;

    --white: #ffffff;
    --page: #f7f7f5;

    --text: #201c1a;
    --text-secondary: #6f6965;
    --text-muted: #aaa39f;

    --border: #dedad7;
    --border-hover: #c7c0bc;

    --danger: #cf3d3d;

    --heading:
        "Plus Jakarta Sans",
        sans-serif;

    --body:
        "DM Sans",
        sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    min-height: 100vh;

    font-family: var(--body);

    color: var(--text);

    background: var(--page);

    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

/* =====================================
   PAGE
===================================== */

.login-page {
    width: 100%;
    min-height: 100vh;

    display: grid;

    grid-template-columns:
        minmax(0, 1.08fr)
        minmax(440px, 0.92fr);

    background: var(--page);
}

/* =====================================
   LEFT SIDE
===================================== */

.visual-section {
    min-width: 0;

    padding:
        clamp(14px, 1.4vw, 24px)
        0
        clamp(14px, 1.4vw, 24px)
        clamp(14px, 1.4vw, 24px);
}

.visual-card {
    position: relative;

    width: 100%;
    height: calc(
        100vh - clamp(28px, 2.8vw, 48px)
    );

    min-height: 560px;

    overflow: hidden;

    border-radius:
        clamp(20px, 2vw, 32px);

    background: #2e2926;

    box-shadow:
        0 18px 50px
        rgba(26, 20, 17, 0.12);
}

.visual-image {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    filter:
        saturate(1.03)
        contrast(1.01);
}

/* =====================================
   VIGNETTE
===================================== */

.visual-vignette {
    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            to bottom,
            rgba(10, 10, 10, 0.01) 0%,
            rgba(10, 10, 10, 0.01) 45%,
            rgba(10, 10, 10, 0.08) 60%,
            rgba(10, 10, 10, 0.7) 100%
        ),
        linear-gradient(
            to right,
            rgba(0, 0, 0, 0.08),
            transparent 25%,
            transparent 78%,
            rgba(0, 0, 0, 0.06)
        );

    pointer-events: none;
}

/* =====================================
   LEFT HEADER
===================================== */

.visual-header {
    position: absolute;

    z-index: 3;

    top: clamp(24px, 3vw, 40px);
    left: clamp(24px, 3vw, 42px);

    display: flex;
    align-items: center;

    gap: 14px;
}

.logo-circle {
    width: clamp(58px, 5vw, 70px);
    height: clamp(58px, 5vw, 70px);

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    overflow: hidden;

    padding: 6px;

    border-radius: 50%;

    background: var(--white);

    box-shadow:
        0 10px 28px
        rgba(0, 0, 0, 0.16);
}

.logo-circle img {
    width: 100%;
    height: 100%;

    object-fit: contain;

    border-radius: 50%;
}

.visual-brand {
    display: flex;
    flex-direction: column;

    gap: 3px;

    color: var(--white);
}

.visual-brand strong {
    font-family: var(--heading);

    font-size:
        clamp(15px, 1.2vw, 18px);

    font-weight: 700;

    letter-spacing: -0.025em;
}

.visual-brand span {
    font-size: 9px;
    font-weight: 600;

    color:
        rgba(255, 255, 255, 0.76);

    letter-spacing: 0.07em;

    text-transform: uppercase;
}

/* =====================================
   LEFT CONTENT
===================================== */

.visual-content {
    position: absolute;

    z-index: 3;

    left: clamp(28px, 4vw, 48px);
    right: clamp(28px, 4vw, 48px);
    bottom: clamp(68px, 8vh, 92px);

    max-width: 680px;

    color: var(--white);
}

.visual-label {
    display: block;

    margin-bottom: 16px;

    font-size: 10px;
    font-weight: 700;

    color: #d5f3df;

    letter-spacing: 0.12em;

    text-transform: uppercase;
}

.visual-content h1 {
    max-width: 670px;

    font-family: var(--heading);

    font-size:
        clamp(40px, 4.3vw, 68px);

    font-weight: 700;

    line-height: 1.03;

    letter-spacing: -0.055em;

    text-shadow:
        0 5px 24px
        rgba(0, 0, 0, 0.18);
}

.visual-content p {
    max-width: 520px;

    margin-top: 18px;

    font-size:
        clamp(13px, 1.1vw, 15px);

    line-height: 1.65;

    color:
        rgba(255, 255, 255, 0.82);
}

.visual-footer {
    position: absolute;

    z-index: 3;

    left: clamp(28px, 4vw, 48px);
    bottom: 24px;

    font-size: 8px;
    font-weight: 600;

    color:
        rgba(255, 255, 255, 0.5);

    letter-spacing: 0.08em;

    text-transform: uppercase;
}

/* =====================================
   RIGHT FORM SECTION
===================================== */

.form-section {
    position: relative;

    min-width: 0;
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding:
        clamp(40px, 5vw, 72px)
        clamp(42px, 6vw, 100px);

    background:
        radial-gradient(
            circle at 100% 100%,
            rgba(228, 213, 179, 0.18),
            transparent 32%
        ),
        var(--white);
}

.form-container {
    width: min(100%, 440px);
}

.mobile-brand {
    display: none;
}

/* =====================================
   HEADING
===================================== */

.form-header {
    margin-bottom: 36px;
}

.form-kicker {
    display: block;

    margin-bottom: 11px;

    font-size: 10px;
    font-weight: 700;

    color: var(--green);

    letter-spacing: 0.12em;

    text-transform: uppercase;
}

.form-header h2 {
    font-family: var(--heading);

    font-size:
        clamp(34px, 3.3vw, 43px);

    font-weight: 700;

    line-height: 1.1;

    color: var(--maroon);

    letter-spacing: -0.05em;
}

.form-header p {
    margin-top: 11px;

    font-size: 14px;

    line-height: 1.6;

    color: var(--text-secondary);
}

/* =====================================
   FORM
===================================== */

.login-form {
    width: 100%;
}

.login-message {
    display: none;

    margin-bottom: 17px;

    padding: 11px 13px;

    border-radius: 8px;

    font-size: 12px;

    line-height: 1.45;
}

.login-message.error {
    display: block;

    color: #992f2f;

    border:
        1px solid
        #eccaca;

    background: #fff4f4;
}

.login-message.success {
    display: block;

    color: #146b39;

    border:
        1px solid
        #cce7d6;

    background: #eff9f2;
}

/* =====================================
   FIELDS
===================================== */

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: inline-block;

    margin-bottom: 9px;

    font-size: 12px;
    font-weight: 600;

    color: #403b38;
}

.form-group > input,
.password-field input {
    width: 100%;
    height: 54px;

    padding:
        0
        16px;

    border:
        1px solid
        var(--border);

    border-radius: 10px;

    outline: none;

    background: var(--white);

    color: var(--text);

    font-size: 14px;

    transition:
        border-color 150ms ease,
        box-shadow 150ms ease;
}

.form-group > input::placeholder,
.password-field input::placeholder {
    color: #a9a19d;
}

.form-group > input:hover,
.password-field input:hover {
    border-color: var(--border-hover);
}

.form-group > input:focus,
.password-field input:focus {
    border-color: var(--green);

    box-shadow:
        0 0 0 3px
        rgba(23, 163, 80, 0.1);
}

.form-group > input.invalid,
.password-field input.invalid {
    border-color: var(--danger);

    box-shadow:
        0 0 0 3px
        rgba(207, 61, 61, 0.08);
}

.form-group > input.valid,
.password-field input.valid {
    border-color: var(--border);
}

/* =====================================
   PASSWORD
===================================== */

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;

    top: 50%;
    right: 7px;

    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    transform: translateY(-50%);

    cursor: pointer;

    border: 0;

    border-radius: 8px;

    background: transparent;

    color: #8c8581;
}

.password-toggle:hover {
    color: var(--maroon);

    background:
        rgba(124, 19, 61, 0.05);
}

/* =====================================
   ERRORS
===================================== */

.field-error {
    min-height: 16px;

    margin-top: 6px;

    font-size: 11px;
    font-weight: 500;

    color: var(--danger);
}

/* =====================================
   REMEMBER
===================================== */

.form-options {
    margin-bottom: 23px;
}

.remember-me {
    display: inline-flex;
    align-items: center;

    gap: 9px;

    cursor: pointer;

    user-select: none;

    color: var(--text-secondary);

    font-size: 12px;
    font-weight: 500;
}

.remember-me input {
    position: absolute;

    width: 1px;
    height: 1px;

    opacity: 0;
}

.checkbox-ui {
    position: relative;

    width: 18px;
    height: 18px;

    flex-shrink: 0;

    border:
        1px solid
        #c7c0bc;

    border-radius: 4px;

    background: var(--white);

    transition:
        background-color 150ms ease,
        border-color 150ms ease,
        box-shadow 150ms ease;
}

.remember-me
input:checked
+
.checkbox-ui {
    background: var(--green);

    border-color: var(--green);
}

.remember-me
input:checked
+
.checkbox-ui::after {
    content: "";

    position: absolute;

    left: 5px;
    top: 2px;

    width: 4px;
    height: 8px;

    border:
        solid
        var(--white);

    border-width:
        0
        2px
        2px
        0;

    transform: rotate(45deg);
}

/* =====================================
   BUTTON
===================================== */

.login-button {
    width: 100%;
    height: 54px;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    border: 0;

    border-radius: 10px;

    color: var(--white);

    background: var(--green);

    box-shadow:
        0 10px 24px
        rgba(23, 163, 80, 0.18);

    transition:
        background-color 150ms ease,
        transform 150ms ease,
        box-shadow 150ms ease;
}

.login-button:hover {
    background: var(--green-dark);

    transform: translateY(-1px);

    box-shadow:
        0 14px 28px
        rgba(23, 163, 80, 0.22);
}

.login-button:active {
    transform: translateY(0);
}

.login-button:disabled {
    cursor: not-allowed;

    opacity: 0.7;

    transform: none;
}

.button-label {
    font-size: 13px;
    font-weight: 700;
}

.button-loader {
    display: none;

    width: 20px;
    height: 20px;

    border:
        2px solid
        rgba(255, 255, 255, 0.35);

    border-top-color: var(--white);

    border-radius: 50%;

    animation:
        spin
        650ms
        linear
        infinite;
}

.login-button.loading
.button-label {
    display: none;
}

.login-button.loading
.button-loader {
    display: block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =====================================
   FOOTER
===================================== */

.form-footer {
    position: absolute;

    left: clamp(42px, 6vw, 100px);
    right: clamp(42px, 6vw, 100px);
    bottom: 24px;

    display: flex;
    justify-content: space-between;

    gap: 20px;

    color: var(--text-muted);

    font-size: 8px;
    font-weight: 600;

    letter-spacing: 0.06em;

    text-transform: uppercase;
}

/* =====================================
   LARGE SCREENS
===================================== */

@media (min-width: 1600px) {

    .login-page {
        grid-template-columns:
            minmax(0, 1.18fr)
            minmax(520px, 0.82fr);
    }

    .form-container {
        max-width: 460px;
    }
}

/* =====================================
   LAPTOP
===================================== */

@media (max-width: 1200px) {

    .login-page {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(430px, 0.9fr);
    }

    .visual-content h1 {
        font-size: clamp(
            38px,
            4vw,
            52px
        );
    }

    .form-section {
        padding-left: 48px;
        padding-right: 48px;
    }
}

/* =====================================
   SMALL HEIGHT
===================================== */

@media
(max-height: 760px)
and
(min-width: 901px) {

    .visual-card {
        min-height: 0;
    }

    .visual-header {
        top: 22px;
    }

    .logo-circle {
        width: 56px;
        height: 56px;
    }

    .visual-content {
        bottom: 58px;
    }

    .visual-content h1 {
        font-size: 40px;
    }

    .visual-content p {
        margin-top: 10px;

        line-height: 1.45;
    }

    .visual-footer {
        bottom: 16px;
    }

    .form-header {
        margin-bottom: 23px;
    }

    .form-header h2 {
        font-size: 34px;
    }

    .form-group {
        margin-bottom: 12px;
    }

    .form-group > input,
    .password-field input,
    .login-button {
        height: 48px;
    }

    .form-options {
        margin-bottom: 16px;
    }

    .form-footer {
        bottom: 13px;
    }
}

/* =====================================
   TABLET
===================================== */

@media (max-width: 900px) {

    body {
        overflow-y: auto;
    }

    .login-page {
        display: block;

        min-height: 100vh;
    }

    .visual-section {
        display: none;
    }

    .form-section {
        min-height: 100vh;

        padding:
            36px
            24px
            78px;
    }

    .form-container {
        max-width: 480px;
    }

    .mobile-brand {
        display: flex;
        align-items: center;

        gap: 13px;

        margin-bottom: 40px;
    }

    .mobile-brand strong {
        display: block;

        font-family: var(--heading);

        color: var(--maroon);

        font-size: 16px;
    }

    .mobile-brand span {
        display: block;

        margin-top: 3px;

        color: var(--text-muted);

        font-size: 8px;
        font-weight: 600;

        letter-spacing: 0.07em;

        text-transform: uppercase;
    }

    .form-footer {
        left: 24px;
        right: 24px;
    }
}

/* =====================================
   MOBILE
===================================== */

@media (max-width: 520px) {

    .form-section {
        align-items: flex-start;

        padding:
            26px
            20px
            72px;
    }

    .mobile-brand {
        margin-bottom: 34px;
    }

    .logo-circle {
        width: 58px;
        height: 58px;
    }

    .form-header {
        margin-bottom: 28px;
    }

    .form-header h2 {
        font-size: 32px;
    }

    .form-group > input,
    .password-field input,
    .login-button {
        height: 52px;
    }

    .form-footer {
        left: 20px;
        right: 20px;

        flex-direction: column;

        align-items: flex-start;

        gap: 3px;
    }
}

/* =====================================
   VERY SMALL MOBILE
===================================== */

@media (max-width: 360px) {

    .form-section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .form-header h2 {
        font-size: 29px;
    }

    .mobile-brand span {
        font-size: 7px;
    }
}