
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #faf6ec;
    color: #263f35;
    min-height: 100vh;
}

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

button,
input,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

[hidden] {
    display: none !important;
}

.auth-layout {
    min-height: 100vh;
    padding: 130px 20px 60px;

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

.auth-card {
    width: 100%;
    max-width: 470px;

    padding: 42px 40px;

    background-color: #ffffff;
    border-radius: 18px;

    box-shadow: 0 8px 35px rgba(0, 0, 0, 0.06);
}

.auth-card h1 {
    margin-bottom: 30px;

    font-size: 32px;
    font-weight: 700;
    color: #263f35;

    text-align: center;
}

.auth-description {
    margin: -15px 0 30px;

    color: #777777;
    font-size: 13px;
    line-height: 1.8;

    text-align: center;
}

.auth-form {
    width: 100%;

    display: flex;
    flex-direction: column;

    gap: 20px;
}

.field-wrap {
    position: relative;

    display: flex;
    align-items: center;

    width: 100%;
    min-height: 55px;

    background-color: #f8f9fa;

    border: 1px solid #e5e5e5;
    border-radius: 8px;

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

.field-wrap:hover {
    border-color: #b5cfbe;
}

.field-wrap:focus-within {
    border-color: #31824C;

    box-shadow: 0 0 0 3px
        rgba(49, 130, 76, 0.08);
}

.field-icon {
    position: absolute;

    left: 16px;

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

    color: #808080;
    font-size: 18px;

    pointer-events: none;
}

.field-icon svg {
    width: 22px;
    height: 22px;

    stroke: #808080;
    flex-shrink: 0;
}

.field-wrap input {
    width: 100%;
    min-height: 55px;

    padding: 14px 48px;

    background: transparent;

    border: none;
    outline: none;

    color: #263f35;

    font-size: 13px;
}

.field-wrap input::placeholder {
    color: #969b98;
}

.field-wrap input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.eye-btn {
    position: absolute;

    right: 15px;
    top: 50%;

    transform: translateY(-50%);

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

    width: 30px;
    height: 30px;

    padding: 0;

    background: transparent;
    border: none;

    color: #808080;

    cursor: pointer;
}

.eye-btn svg {
    width: 22px;
    height: 22px;

    stroke: #808080;

    transition: stroke 0.3s ease;
}

.eye-btn:hover svg {
    stroke: #31824C;
}

.eye-btn:focus-visible {
    outline: 2px solid #31824C;
    outline-offset: 3px;

    border-radius: 4px;
}

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

    gap: 12px;
}

.remember {
    display: flex;
    align-items: center;

    gap: 8px;

    color: #555555;
    font-size: 12px;

    cursor: pointer;
}

.remember input {
    width: 15px;
    height: 15px;

    accent-color: #31824C;

    cursor: pointer;
}

.auth-options a {
    color: #31824C;

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

    transition: color 0.3s ease;
}

.auth-options a:hover {
    color: #256638;

    text-decoration: underline;
}

.auth-message {
    font-size: 12px;
    line-height: 1.6;

    text-align: center;
}

.auth-message:empty {
    display: none;
}

.auth-message.error {
    color: #cc3434;
}

.auth-message.success {
    color: #31824C;
}

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

    width: 100%;
    min-height: 52px;

    padding: 12px 20px;

    background-color: #31824C;
    color: #FFFFFF;

    border: 2px solid #31824C;
    border-radius: 8px;

    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;

    text-align: center;
    text-decoration: none;

    cursor: pointer;

    transition:
        background-color 0.3s ease,
        color 0.3s ease,
        border-color 0.3s ease;
}

.auth-card .auth-btn:hover {
    background-color: #FFFFFF;
    color: #31824C;

    border-color: #31824C;

    transform: none;
}

.auth-card .auth-btn:active {
    background-color: #E8F3EC;
    color: #256638;

    border-color: #256638;

    transform: none;
}

.auth-card .auth-btn:disabled {
    background-color: #31824C;
    color: #FFFFFF;

    border-color: #31824C;

    opacity: 0.55;

    cursor: not-allowed;
    transform: none;
}

.auth-card .auth-btn:disabled:hover {
    background-color: #31824C;
    color: #FFFFFF;

    border-color: #31824C;
}

.auth-card .auth-btn:focus-visible {
    outline: 3px solid #A5D6A7;
    outline-offset: 3px;
}

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

    gap: 12px;

    margin: 28px 0 20px;

    color: #909090;
    font-size: 12px;

    text-align: center;
}

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

    flex: 1;
    height: 1px;

    background-color: #e5e5e5;
}

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

    gap: 17px;
}

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

    width: 44px;
    height: 44px;

    background-color: #FFFFFF;
    color: #777777;

    border: 1px solid #E4E4E4;
    border-radius: 50%;

    font-size: 19px;

    transition:
        background-color 0.3s ease,
        color 0.3s ease,
        border-color 0.3s ease;
}

.socials button:not(:disabled):hover {
    background-color: #FFFFFF;
    color: #31824C;

    border-color: #31824C;
}

.socials button:disabled {
    opacity: 0.55;

    cursor: not-allowed;
}

.auth-switch {
    margin-top: 25px;

    color: #777777;

    font-size: 12px;
    text-align: center;
}

.auth-switch a {
    margin-left: 4px;

    color: #31824C;

    font-weight: 600;

    transition: color 0.3s ease;
}

.auth-switch a:hover {
    color: #256638;

    text-decoration: underline;
}

.auth-card.register {
    max-width: 500px;
}

.terms {
    display: flex;
    align-items: flex-start;

    gap: 10px;

    color: #555555;

    font-size: 12px;
    line-height: 1.6;

    cursor: pointer;
}

.terms input {
    width: 15px;
    height: 15px;

    margin-top: 2px;

    flex-shrink: 0;

    accent-color: #31824C;

    cursor: pointer;
}

.terms span {
    flex: 1;
}

.terms a {
    color: #31824C;
    font-weight: 500;
}

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

.auth-card.forgot {
    max-width: 470px;
}

.auth-card.forgot h1 {
    margin-bottom: 25px;

    font-size: 30px;
}

.auth-card.forgot .auth-description {
    margin-bottom: 30px;
}

.auth-card.forgot .auth-btn {
    margin-top: 5px;
}

.auth-card.reset {
    max-width: 470px;
}

.auth-card.reset h1 {
    margin-bottom: 25px;

    font-size: 30px;
}

.auth-card.reset .auth-description {
    margin-bottom: 30px;
}

.auth-card.reset .auth-btn {
    margin-top: 5px;
}

.auth-card.account {
    max-width: 480px;

    text-align: center;
}

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

    width: 90px;
    height: 90px;

    margin: 0 auto 25px;

    background-color: #E0EEE5;
    color: #263F35;

    border-radius: 50%;

    font-size: 36px;
    font-weight: 700;
}

.account-details {
    margin: 30px 0;

    text-align: left;
}

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

    gap: 7px;

    padding: 18px 0;

    border-bottom: 1px solid #E5E5E5;
}

.account-field span {
    color: #888888;

    font-size: 12px;
}

.account-field strong {
    color: #263F35;

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

    overflow-wrap: anywhere;
}

.logout-btn {
    margin-top: 10px;
}

.back-home {
    display: inline-block;

    margin-top: 22px;

    color: #31824C;

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

    transition: color 0.3s ease;
}

.back-home:hover {
    color: #256638;

    text-decoration: underline;
}

@media (max-width: 1440px) {

    html {
        font-size: 75%;
    }

}

@media (max-width: 1024px) {

    html {
        font-size: 65%;
    }

}

@media (max-width: 768px) {

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

        padding: 110px 16px 40px;
    }

    .auth-card {
        max-width: 470px;

        padding: 35px 25px;
    }

}

@media (max-width: 600px) {

    html {
        font-size: 55%;
    }

}


@media (max-width: 420px) {

    .auth-card,
    .auth-card.register,
    .auth-card.forgot,
    .auth-card.reset,
    .auth-card.account {
        padding: 30px 20px;
    }

    .auth-card h1 {
        font-size: 27px;
    }

    .auth-card.forgot h1,
    .auth-card.reset h1 {
        font-size: 25px;
    }

    .auth-description {
        font-size: 12px;
    }

    .auth-options {
        flex-wrap: wrap;
    }

    .auth-card .auth-btn {
        font-size: 14px;
    }

}

@media (prefers-reduced-motion: reduce) {

    .auth-card .auth-btn,
    .field-wrap,
    .socials button,
    .auth-switch a,
    .back-home {
        transition: none;
    }

}