[hidden] {
    display: none !important;
}

.auth-body {
    min-height: 100vh;
    background: #f4faf6;
}

.auth-page {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(520px, 1.05fr);
    min-height: calc(100vh - 166px);
}

.auth-intro {
    position: relative;
    display: flex;
    overflow: hidden;
    padding: 70px clamp(45px, 7vw, 110px);
    align-items: center;
    background:
        radial-gradient(circle at 12% 90%, rgba(167, 223, 184, 0.16), transparent 30%),
        linear-gradient(145deg, #032c23 0%, #064e3b 57%, #087f5b 100%);
    color: #ffffff;
}

.auth-intro::before,
.auth-intro::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 50%;
}

.auth-intro::before {
    top: -180px;
    right: -140px;
    width: 390px;
    height: 390px;
}

.auth-intro::after {
    right: -80px;
    bottom: -250px;
    width: 500px;
    height: 500px;
    border-width: 70px;
}

.auth-intro-content {
    position: relative;
    z-index: 1;
    width: min(100%, 610px);
}

.auth-label {
    display: block;
    margin-bottom: 14px;
    color: #087f5b;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.15rem;
}

.auth-intro .auth-label {
    color: #a7dfb8;
}

.auth-intro h1 {
    margin-bottom: 21px;
    font-size: clamp(2.5rem, 5vw, 4.3rem);
    line-height: 1.02;
    letter-spacing: -0.09rem;
}

.auth-intro h1 span {
    display: block;
    color: #a7dfb8;
}

.auth-intro > .auth-intro-content > p {
    max-width: 570px;
    color: #d6e9e1;
    font-size: 1rem;
    line-height: 1.75;
}

.auth-steps {
    display: grid;
    margin-top: 45px;
    gap: 23px;
    list-style: none;
}

.auth-steps li {
    display: grid;
    grid-template-columns: 45px 1fr;
    gap: 16px;
    align-items: start;
}

.auth-steps li > span {
    display: grid;
    width: 45px;
    height: 45px;
    place-items: center;
    border: 1px solid rgba(167, 223, 184, 0.42);
    border-radius: 50%;
    background: rgba(167, 223, 184, 0.09);
    color: #a7dfb8;
    font-size: 0.75rem;
    font-weight: 900;
}

.auth-steps strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.98rem;
}

.auth-steps p {
    color: #bfd8ce;
    font-size: 0.87rem;
    line-height: 1.5;
}

.auth-form-area {
    display: flex;
    padding: 55px clamp(25px, 6vw, 90px);
    align-items: center;
    justify-content: center;
    background: #f4faf6;
}

.auth-card {
    width: min(100%, 520px);
    padding: clamp(28px, 4vw, 44px);
    border: 1px solid #dcebe4;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 24px 65px rgba(6, 78, 59, 0.10);
}

.auth-card-heading {
    margin-bottom: 27px;
}

.auth-card-heading h2,
.session-view h2 {
    margin-bottom: 9px;
    color: #064e3b;
    font-size: clamp(1.55rem, 3vw, 2rem);
    line-height: 1.2;
}

.auth-card-heading p,
.session-view > p {
    color: #617b77;
    font-size: 0.94rem;
    line-height: 1.6;
}

.mode-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 20px;
    padding: 4px;
    border-radius: 8px;
    background: #eef8f2;
}

.mode-tab {
    min-height: 43px;
    padding: 0 14px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #617b77;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 800;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.mode-tab.active {
    background: #ffffff;
    color: #064e3b;
    box-shadow: 0 4px 14px rgba(6, 78, 59, 0.09);
}

.google-button {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 48px;
    padding: 0 18px;
    align-items: center;
    justify-content: center;
    gap: 11px;
    border: 1px solid #cfded7;
    border-radius: 7px;
    background: #ffffff;
    color: #24483f;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 800;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.google-button:hover {
    border-color: #087f5b;
    background: #f8fcfa;
}

.google-mark {
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border: 1px solid #d9e2de;
    border-radius: 50%;
    color: #315b50;
    font-size: 0.82rem;
    font-weight: 900;
}

.auth-divider {
    display: flex;
    margin: 24px 0;
    align-items: center;
    gap: 13px;
    color: #779088;
    font-size: 0.78rem;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #dcebe4;
}

.auth-divider span {
    white-space: nowrap;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    color: #315b50;
    font-size: 0.83rem;
    font-weight: 800;
}

.form-group input,
.form-group select {
    width: 100%;
    height: 49px;
    padding: 0 15px;
    border: 1px solid #cfded7;
    border-radius: 7px;
    outline: none;
    background: #ffffff;
    color: #153e34;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input::placeholder {
    color: #96aaa4;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #087f5b;
    box-shadow: 0 0 0 4px rgba(8, 127, 91, 0.10);
}

.password-input {
    position: relative;
}

.password-input input {
    padding-right: 88px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    min-width: 68px;
    padding: 7px 8px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 5px;
    background: #eef8f2;
    color: #087f5b;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 800;
}

.field-help {
    display: block;
    margin-top: 7px;
    color: #779088;
    font-size: 0.74rem;
    line-height: 1.4;
}

.forgot-password-button {
    display: block;
    margin: -5px 0 18px auto;
    padding: 3px 0;
    border: 0;
    background: transparent;
    color: #087f5b;
    cursor: pointer;
    font-size: 0.79rem;
    font-weight: 800;
}

.password-toggle:hover,
.forgot-password-button:hover {
    color: #064e3b;
}

.auth-submit {
    position: relative;
    display: inline-flex;
    width: 100%;
    min-height: 49px;
    padding: 0 20px;
    align-items: center;
    justify-content: center;
    border: 1px solid #087f5b;
    border-radius: 7px;
    background: #087f5b;
    color: #ffffff;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 800;
    text-align: center;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.auth-submit:hover {
    background: #064e3b;
    transform: translateY(-1px);
}

.auth-submit:disabled,
.google-button:disabled,
.resend-button:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.auth-submit.loading,
.google-button.loading {
    color: transparent;
    pointer-events: none;
}

.auth-submit.loading::after,
.google-button.loading::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: auth-spin 0.7s linear infinite;
}

.google-button.loading::after {
    border-color: rgba(8, 127, 91, 0.25);
    border-top-color: #087f5b;
}

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

.verification-view,
.recovery-view,
.session-view {
    text-align: center;
}

.back-button {
    display: inline-flex;
    margin-bottom: 24px;
    padding: 0;
    align-items: center;
    gap: 5px;
    border: 0;
    background: transparent;
    color: #087f5b;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 800;
}

.back-button span {
    font-size: 1.25rem;
}

.verification-icon {
    display: grid;
    width: 55px;
    height: 55px;
    margin: 0 auto 18px;
    place-items: center;
    border-radius: 50%;
    background: #eef8f2;
    color: #087f5b;
    font-size: 1.35rem;
    font-weight: 900;
}

.verification-view .form-group,
.recovery-view .form-group {
    text-align: left;
}

.form-group .verification-code {
    height: 58px;
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: 0.65rem;
    text-align: center;
}

.resend-button,
.logout-button {
    margin-top: 18px;
    padding: 4px;
    border: 0;
    background: transparent;
    color: #087f5b;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 800;
}

.security-note {
    margin-top: 24px;
    padding-top: 19px;
    border-top: 1px solid #e1ece7;
    color: #779088;
    font-size: 0.78rem;
    line-height: 1.55;
}

.session-view .auth-label {
    margin-top: 5px;
}

.session-view > p {
    margin-bottom: 24px;
    overflow-wrap: anywhere;
}

.session-link {
    text-decoration: none;
}

.auth-message {
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 7px;
    font-size: 0.82rem;
    line-height: 1.5;
    text-align: left;
}

.auth-message.info {
    border-color: #c8e1d6;
    background: #eef8f2;
    color: #315b50;
}

.auth-message.success {
    border-color: #acd9bc;
    background: #e9f8ef;
    color: #075c42;
}

.auth-message.error {
    border-color: #f0c8c8;
    background: #fff2f2;
    color: #8a2f2f;
}

@media (max-width: 1050px) {
    .auth-page {
        grid-template-columns: 1fr;
    }

    .auth-intro {
        min-height: 430px;
        padding-top: 60px;
        padding-bottom: 60px;
    }

    .auth-steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
    }

    .auth-steps li {
        grid-template-columns: 1fr;
    }

    .auth-form-area {
        padding-top: 60px;
        padding-bottom: 70px;
    }
}

@media (max-width: 700px) {
    .auth-intro {
        min-height: auto;
        padding: 52px 24px;
    }

    .auth-intro h1 {
        font-size: clamp(2.4rem, 13vw, 3.5rem);
    }

    .auth-steps {
        grid-template-columns: 1fr;
    }

    .auth-steps li {
        grid-template-columns: 45px 1fr;
    }

    .auth-form-area {
        padding: 32px 16px 50px;
    }

    .auth-card {
        padding: 27px 21px;
    }

}

@media (prefers-reduced-motion: reduce) {
    .auth-submit.loading::after,
    .google-button.loading::after {
        animation-duration: 1.6s;
    }
}
