/*
|--------------------------------------------------------------------------
| Auth tokens
|--------------------------------------------------------------------------
*/

:root {
    --auth-primary: #6d28d9;
    --auth-primary-hover: #5b21b6;

    --auth-text: #18181b;
    --auth-muted: #71717a;
    --auth-border: #e4e4e7;
    --auth-background: #ffffff;
}


/*
|--------------------------------------------------------------------------
| Reset
|--------------------------------------------------------------------------
*/

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;

    margin: 0;

    background: var(--auth-background);

    color: var(--auth-text);

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

a {
    color: inherit;

    text-decoration: none;
}

button,
input {
    font: inherit;
}


/*
|--------------------------------------------------------------------------
| Layout
|--------------------------------------------------------------------------
*/

.auth-layout {
    min-height: 100vh;

    display: grid;

    grid-template-columns:
        minmax(420px, 0.9fr)
        minmax(520px, 1.1fr);
}

.auth-showcase {
    position: relative;

    overflow: hidden;

    padding: 52px;

    background:
        linear-gradient(
            145deg,
            #4c1d95 0%,
            #5b21b6 45%,
            #7c3aed 100%
        );

    color: #ffffff;
}

.auth-showcase::before {
    content: "";

    position: absolute;

    width: 520px;
    height: 520px;

    top: -300px;
    right: -260px;

    border:
        1px solid
        rgba(255, 255, 255, 0.12);

    border-radius: 50%;
}

.auth-showcase::after {
    content: "";

    position: absolute;

    width: 360px;
    height: 360px;

    left: -210px;
    bottom: -210px;

    background:
        rgba(255, 255, 255, 0.04);

    border-radius: 50%;
}

.auth-showcase-inner {
    position: relative;
    z-index: 1;

    width: 100%;
    max-width: 560px;
    min-height: calc(100vh - 104px);

    display: flex;
    flex-direction: column;

    margin: 0 auto;
}

.auth-brand {
    align-self: flex-start;

    display: block;

    width: min(100%, 220px);
}
.auth-brand img {
    display: block;

    width: 100%;
    height: auto;

    object-fit: contain;

}


/*
|--------------------------------------------------------------------------
| Showcase content
|--------------------------------------------------------------------------
*/

.auth-showcase-content {
    margin-top: auto;

    padding-top: 80px;
}

.auth-showcase-eyebrow {
    display: block;

    margin-bottom: 16px;

    color:
        rgba(255, 255, 255, 0.68);

    font-size: 12px;
    font-weight: 650;

    letter-spacing: 0.04em;

    text-transform: uppercase;
}

.auth-showcase-content h1 {
    max-width: 520px;

    margin: 0;

    font-size:
        clamp(
            38px,
            4vw,
            58px
        );

    font-weight: 750;

    letter-spacing: -0.045em;

    line-height: 1.03;
}

.auth-showcase-content p {
    max-width: 500px;

    margin:
        22px
        0
        0;

    color:
        rgba(255, 255, 255, 0.72);

    font-size: 15px;

    line-height: 1.7;
}


/*
|--------------------------------------------------------------------------
| Showcase preview
|--------------------------------------------------------------------------
*/

.auth-showcase-preview {
    margin-top: 46px;

    padding: 22px;

    background:
        rgba(255, 255, 255, 0.1);

    border:
        1px solid
        rgba(255, 255, 255, 0.14);

    border-radius: 16px;

    backdrop-filter: blur(8px);
}

.auth-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    color:
        rgba(255, 255, 255, 0.68);

    font-size: 11px;
}

.auth-preview-period {
    padding:
        5px
        8px;

    background:
        rgba(255, 255, 255, 0.1);

    border-radius: 6px;
}

.auth-preview-balance {
    display: block;

    margin-top: 10px;

    font-size: 27px;
    font-weight: 700;

    letter-spacing: -0.025em;
}

.auth-preview-summary {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 10px;

    margin-top: 22px;
}

.auth-preview-summary > div {
    padding: 12px;

    background:
        rgba(255, 255, 255, 0.08);

    border-radius: 9px;
}

.auth-preview-summary span {
    display: block;

    margin-bottom: 5px;

    color:
        rgba(255, 255, 255, 0.6);

    font-size: 10px;
}

.auth-preview-summary strong {
    font-size: 12px;
}

.auth-preview-summary .is-income {
    color: #a7f3d0;
}

.auth-preview-summary .is-expense {
    color: #fecaca;
}


/*
|--------------------------------------------------------------------------
| Auth content
|--------------------------------------------------------------------------
*/

.auth-content {
    display: flex;
    align-items: center;
    justify-content: center;

    padding:
        56px
        72px;

    background: #ffffff;
}

.auth-content-inner {
    width: 100%;
    max-width: 440px;
}

.auth-mobile-brand {
    display: none;
}

.auth-form-container {
    width: 100%;
}


/*
|--------------------------------------------------------------------------
| Tabs
|--------------------------------------------------------------------------
*/

.auth-tabs {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 4px;

    margin-bottom: 44px;

    padding: 4px;

    background: #f4f4f5;

    border-radius: 10px;
}

.auth-tab {
    min-height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0 16px;

    background: transparent;

    border: 0;
    border-radius: 7px;

    color: var(--auth-muted);

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease;
}

.auth-tab.is-active {
    background: #ffffff;

    color: var(--auth-text);

    box-shadow:
        0 1px 3px
        rgba(0, 0, 0, 0.08);
}

.auth-tab:focus-visible,
.auth-forgot-password:focus-visible,
.auth-password-toggle:focus-visible,
.auth-mobile-switch a:focus-visible,
.auth-terms a:focus-visible {
    outline: 2px solid var(--auth-primary);
    outline-offset: 3px;
}

/*
|--------------------------------------------------------------------------
| Auth views
|--------------------------------------------------------------------------
*/

.auth-views {
    width: 100%;
}

.auth-view {
    width: 100%;
}

.auth-view.is-active {
    animation:
        auth-view-enter
        0.2s
        ease
        both;
}

@keyframes auth-view-enter {

    from {
        opacity: 0;

        transform:
            translateY(6px);
    }

    to {
        opacity: 1;

        transform:
            translateY(0);
    }

}

/*
|--------------------------------------------------------------------------
| Form header
|--------------------------------------------------------------------------
*/

.auth-form-header {
    margin-bottom: 30px;
}

.auth-form-header h2 {
    margin: 0;

    font-size: 30px;
    font-weight: 750;

    letter-spacing: -0.035em;
}

.auth-form-header p {
    margin:
        10px
        0
        0;

    color: var(--auth-muted);

    font-size: 14px;

    line-height: 1.6;
}


/*
|--------------------------------------------------------------------------
| Form
|--------------------------------------------------------------------------
*/

.auth-form {
    display: flex;
    flex-direction: column;

    gap: 20px;
}

.auth-field {
    display: flex;
    flex-direction: column;

    gap: 8px;
}

.auth-field label {
    color: #3f3f46;

    font-size: 12px;
    font-weight: 600;
}

.auth-field-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}

.auth-forgot-password {
    color: var(--auth-primary);

    font-size: 11px;
    font-weight: 600;
}

.auth-forgot-password:hover {
    text-decoration: underline;
}

.auth-input {
    min-height: 48px;

    display: flex;
    align-items: center;

    gap: 10px;

    padding:
        0
        14px;

    background: #ffffff;

    border:
        1px solid var(--auth-border);

    border-radius: 9px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.auth-input:focus-within {
    border-color: var(--auth-primary);

    box-shadow:
        0 0 0 3px
        rgba(109, 40, 217, 0.09);
}

.auth-input > svg {
    width: 17px;
    height: 17px;

    flex-shrink: 0;

    color: #a1a1aa;

    stroke-width: 1.8;
}

.auth-input input {
    width: 100%;
    min-width: 0;

    padding:
        13px
        0;

    background: transparent;

    border: 0;
    outline: 0;

    color: var(--auth-text);

    font-size: 13px;
}

.auth-input input::placeholder {
    color: #a1a1aa;
}

.auth-input input:-webkit-autofill,
.auth-input input:-webkit-autofill:hover,
.auth-input input:-webkit-autofill:focus,
.auth-input input:-webkit-autofill:active,
.auth-input input:autofill {
    -webkit-text-fill-color: var(--auth-text);

    -webkit-box-shadow:
        0 0 0 1000px
        var(--auth-background)
        inset;

    box-shadow:
        0 0 0 1000px
        var(--auth-background)
        inset;
}


/*
|--------------------------------------------------------------------------
| Password
|--------------------------------------------------------------------------
*/

.auth-password-toggle {
    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    padding: 4px;

    background: transparent;

    border: 0;

    color: #a1a1aa;

    cursor: pointer;
}

.auth-password-toggle:hover {
    color: var(--auth-text);
}

.auth-password-toggle svg {
    width: 17px;
    height: 17px;

    stroke-width: 1.8;
}


/*
|--------------------------------------------------------------------------
| Submit
|--------------------------------------------------------------------------
*/

.auth-submit {
    min-height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    margin-top: 4px;

    padding:
        0
        20px;

    background: var(--auth-primary);

    border: 0;
    border-radius: 9px;

    color: #ffffff;

    font-size: 13px;
    font-weight: 650;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.auth-submit:hover {
    background: var(--auth-primary-hover);
}

.auth-submit:active {
    transform:
        translateY(1px);
}

.auth-submit svg {
    width: 17px;
    height: 17px;
}


/*
|--------------------------------------------------------------------------
| Error
|--------------------------------------------------------------------------
*/

.auth-error {
    display: flex;
    align-items: flex-start;

    gap: 9px;

    margin-bottom: 22px;

    padding:
        12px
        14px;

    background: #fef2f2;

    border:
        1px solid #fecaca;

    border-radius: 8px;

    color: #b91c1c;

    font-size: 12px;

    line-height: 1.5;
}

.auth-error svg {
    width: 16px;
    height: 16px;

    flex-shrink: 0;

    margin-top: 1px;
}


/*
|--------------------------------------------------------------------------
| Mobile switch
|--------------------------------------------------------------------------
*/

.auth-mobile-switch {
    display: none;

    margin:
        24px
        0
        0;

    color: var(--auth-muted);

    font-size: 12px;

    text-align: center;
}

.auth-mobile-switch button {
    padding: 0;

    background: transparent;

    border: 0;

    color: var(--auth-primary);

    font-weight: 650;

    cursor: pointer;
}

.auth-mobile-switch button:hover {
    text-decoration: underline;
}

.auth-mobile-switch a {
    color: var(--auth-primary);

    font-weight: 650;
}

.auth-mobile-switch a:hover {
    text-decoration: underline;
}

/*
|--------------------------------------------------------------------------
| Auth terms
|--------------------------------------------------------------------------
*/

.auth-terms {
    margin:
        20px
        0
        0;

    color: var(--auth-muted);

    font-size: 11px;

    line-height: 1.6;

    text-align: center;
}

.auth-terms a {
    color: var(--auth-primary);

    font-weight: 600;
}

.auth-terms a:hover {
    text-decoration: underline;
}


/*
|--------------------------------------------------------------------------
| Responsive
|--------------------------------------------------------------------------
*/

@media (max-width: 900px) {

    .auth-layout {
        display: block;
    }

    .auth-showcase {
        display: none;
    }

    .auth-content {
        min-height: 100vh;

        flex-direction: column;
        align-items: center;

        padding:
            40px
            24px;
    }

    .auth-content-inner {
        max-width: 420px;
    }

    .auth-mobile-brand {
        display: block;

        width: 132px;

        margin:
            0
            auto
            32px;
    }

    .auth-mobile-brand img {
        display: block;

        width: 100%;
        height: auto;
    }

    .auth-mobile-switch {
        display: block;
    }

}


@media (max-width: 480px) {

    .auth-content {
        align-items: flex-start;

        padding:
            28px
            20px;
    }

    .auth-mobile-brand {
        margin-bottom: 28px;
    }

    .auth-tabs {
        margin-bottom: 36px;
    }

    .auth-form-header h2 {
        font-size: 27px;
    }

}

.auth-google-section {
    display: flex;
    flex-direction: column;

    gap: 20px;

    margin-bottom: 24px;
}

.g_id_signin {
    width: 100%;
}

.g_id_signin > div {
    width: 100% !important;
}

.auth-divider {
    display: flex;
    align-items: center;

    gap: 12px;

    color: var(--auth-muted);

    font-size: 11px;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    content: "";

    height: 1px;

    flex: 1;

    background: var(--auth-border);
}