.auth-page {
    position: relative;
    min-height: calc(100vh - 80px);
    padding: 18px 0 48px;
    overflow: hidden;
    background: transparent;
}

.auth-page .container {
    position: relative;
    z-index: 1;
}

.auth-card {
    overflow: hidden;
    border: 1px solid rgba(23, 78, 31, .12);
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(20, 63, 27, .15);
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(310px, .88fr) minmax(0, 1.12fr);
    min-height: 590px;
}

.auth-aside {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
    padding: clamp(30px, 5vw, 58px);
    overflow: hidden;
    background: linear-gradient(150deg, #155d27 0%, #24953a 55%, #66bd58 100%);
    color: #fff;
}

.auth-aside::before,
.auth-aside::after {
    position: absolute;
    content: "";
    border-radius: 50%;
    background: rgba(255, 255, 255, .09);
    pointer-events: none;
}

.auth-aside::before {
    width: 280px;
    height: 280px;
    top: -115px;
    right: -100px;
}

.auth-aside::after {
    width: 210px;
    height: 210px;
    bottom: -105px;
    left: -75px;
}

.auth-aside__content,
.auth-aside__footer {
    position: relative;
    z-index: 1;
}

.auth-aside__brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 38px;
    font-weight: 900;
    letter-spacing: .01em;
}

.auth-aside__brand img {
    width: 48px;
    height: 48px;
    border: 2px solid rgba(255, 255, 255, .46);
    border-radius: 15px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .16);
}

.auth-aside h2 {
    max-width: 420px;
    margin: 0 0 14px;
    font-size: clamp(1.75rem, 3.2vw, 2.7rem);
    font-weight: 900;
    line-height: 1.08;
}

.auth-aside__intro {
    max-width: 430px;
    margin: 0;
    color: rgba(255, 255, 255, .88);
    font-size: 1rem;
    line-height: 1.65;
}

.auth-benefits {
    display: grid;
    gap: 13px;
    margin: 30px 0 0;
    padding: 0;
    list-style: none;
}

.auth-benefits li {
    display: flex;
    align-items: center;
    gap: 11px;
    font-weight: 700;
}

.auth-benefits i {
    display: grid;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, .15);
}

.auth-aside__footer {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, .78);
    font-size: .82rem;
}

.auth-main {
    min-width: 0;
    padding: clamp(24px, 4vw, 50px);
    background: rgba(255, 255, 255, .98);
}

.auth-head {
    margin-bottom: 30px;
}

.auth-toggle {
    --pos: 0;
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(100%, 500px);
    margin-inline: auto;
    padding: 5px;
    border: 1px solid rgba(22, 96, 39, .1);
    border-radius: 16px;
    background: #eff4ed;
}

.auth-toggle-indicator {
    position: absolute;
    z-index: 0;
    top: 5px;
    bottom: 5px;
    left: 5px;
    width: calc((100% - 10px) / 3);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(24, 83, 35, .12);
    transform: translateX(calc(var(--pos) * 100%));
    transition: transform .3s ease;
}

.auth-card[data-mode="login"] { --pos: 0; }
.auth-card[data-mode="forgot"] { --pos: 1; }
.auth-card[data-mode="register"] { --pos: 2; }
.auth-card { --pos: 0; }
.auth-card .auth-toggle { --pos: inherit; }

.auth-toggle button {
    position: relative;
    z-index: 1;
    min-height: 42px;
    padding: 8px 10px;
    border: 0;
    background: transparent;
    color: #687367;
    font-size: .86rem;
    font-weight: 800;
}

.auth-toggle button[aria-selected="true"] {
    color: #195d29;
}

.auth-body {
    width: 100%;
    overflow: hidden;
}

.auth-slider {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 300%;
    transform: translateX(0);
    transition: transform .35s cubic-bezier(.22, .61, .36, 1);
}

.auth-card[data-mode="forgot"] .auth-slider {
    transform: translateX(-33.333333%);
}

.auth-card[data-mode="register"] .auth-slider {
    transform: translateX(-66.666667%);
}

.auth-panel {
    width: 100%;
    min-width: 0;
    padding: 2px clamp(2px, 2vw, 28px) 8px;
}

.auth-panel h3 {
    margin: 0 0 7px;
    color: #17251a;
    font-size: clamp(1.55rem, 2.7vw, 2rem);
    font-weight: 900;
}

.auth-note {
    min-height: 48px;
    margin-bottom: 24px;
    color: #687369;
    line-height: 1.55;
}

.auth-panel .form-label {
    margin-bottom: 7px;
    color: #334638;
    font-size: .87rem;
    font-weight: 800;
}

.auth-panel .input-group {
    overflow: hidden;
    border: 1px solid #dce6dc;
    border-radius: 14px;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.auth-panel .input-group:focus-within {
    border-color: #45a954;
    box-shadow: 0 0 0 4px rgba(69, 169, 84, .13);
}

.auth-panel .input-group-text,
.auth-panel .form-control {
    min-height: 50px;
    border: 0;
    background: transparent;
}

.auth-panel .input-group-text {
    padding-inline: 16px;
    color: #2c7c3d;
}

.auth-panel .form-control:focus {
    box-shadow: none;
}

.auth-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 18px;
    flex-wrap: wrap;
}

.auth-actions .d-flex {
    flex-wrap: wrap;
}

.auth-linkbtn {
    padding: 0;
    border: 0;
    background: transparent;
    color: #25743a;
    font-size: .84rem;
    font-weight: 800;
}

.auth-linkbtn:hover,
.auth-linkbtn:focus-visible {
    color: #164e27;
    text-decoration: underline;
}

.auth-main .btn-primary,
.auth-main .btn-success {
    min-height: 48px;
    border-color: #207a34;
    background: linear-gradient(135deg, #1b6f2f, #35a649);
    font-weight: 850;
    box-shadow: 0 9px 22px rgba(38, 126, 55, .18);
}

.auth-main .btn-primary:hover,
.auth-main .btn-success:hover {
    border-color: #175b29;
    background: linear-gradient(135deg, #175f2a, #2e923f);
    transform: translateY(-1px);
}

.auth-username-help {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #28783b;
    font-size: .78rem;
    font-weight: 800;
}

.auth-panel .alert {
    border: 0;
    border-radius: 13px;
}

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

    .auth-aside {
        min-height: auto;
        padding: 28px;
    }

    .auth-aside__brand {
        margin-bottom: 18px;
    }

    .auth-aside h2 {
        max-width: none;
        font-size: 1.75rem;
    }

    .auth-benefits,
    .auth-aside__footer {
        display: none;
    }

    .auth-main {
        padding: 30px 24px 36px;
    }
}

@media (max-width: 575.98px) {
    .auth-page {
        padding-top: 10px;
    }

    .auth-page .container {
        padding-inline: 10px;
    }

    .auth-card {
        border-radius: 20px;
    }

    .auth-aside {
        display: none;
    }

    .auth-main {
        padding: 22px 16px 28px;
    }

    .auth-head {
        margin-bottom: 24px;
    }

    .auth-toggle button {
        padding-inline: 5px;
        font-size: .78rem;
    }

    .auth-panel {
        padding-inline: 1px;
    }

    .auth-actions {
        align-items: flex-start;
        flex-direction: column;
    }
}
