/* Animated login/register — adapted from Animated-login-page (desktop animation preserved) */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

.auth-animated-page {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background-color: #e8e8e8;
    background: linear-gradient(to right, #d4d4d4, #f5f5f5);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 24px 16px;
    font-family: 'Montserrat', sans-serif;
    box-sizing: border-box;
}

.auth-animated-page *,
.auth-animated-page *::before,
.auth-animated-page *::after {
    box-sizing: border-box;
}

.auth-animated-page .auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    text-decoration: none;
    color: #1a1a1a;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-animated-page .auth-brand img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.auth-animated-page .auth-container {
    background-color: #fff;
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
    width: 768px;
    max-width: 100%;
    min-height: 560px;
}

.auth-animated-page .auth-container p {
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.3px;
    margin: 20px 0;
}

.auth-animated-page .auth-container span.auth-hint {
    font-size: 12px;
    color: #555;
}

.auth-animated-page .auth-container a:not(.auth-social-icon) {
    color: #333;
    font-size: 13px;
    text-decoration: none;
    margin: 15px 0 10px;
}

.auth-animated-page .auth-container a:not(.auth-social-icon):hover {
    text-decoration: underline;
}

.auth-animated-page .auth-container button.auth-submit,
.auth-animated-page .auth-container button.auth-toggle-btn {
    background-color: #171717;
    color: #fff;
    font-size: 12px;
    padding: 10px 45px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 10px;
    cursor: pointer;
    font-family: inherit;
}

.auth-animated-page .auth-container button.auth-submit:hover {
    filter: brightness(1.08);
}

.auth-animated-page .auth-container button.auth-toggle-btn {
    background-color: transparent;
    border-color: #fff;
}

.auth-animated-page .auth-container form {
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    height: 100%;
    width: 100%;
}

.auth-animated-page .auth-container h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 4px;
}

.auth-animated-page .auth-container input[type="text"],
.auth-animated-page .auth-container input[type="email"],
.auth-animated-page .auth-container input[type="tel"],
.auth-animated-page .auth-container input[type="password"] {
    background-color: #eee;
    border: none;
    margin: 8px 0;
    padding: 10px 15px;
    font-size: 13px;
    border-radius: 8px;
    width: 100%;
    outline: none;
    font-family: inherit;
}

.auth-animated-page .auth-container input.is-invalid {
    box-shadow: inset 0 0 0 1.5px #dc2626;
}

.auth-animated-page .auth-field-error {
    width: 100%;
    font-size: 11px;
    color: #dc2626;
    margin: -4px 0 4px;
    text-align: left;
}

.auth-animated-page .auth-alert {
    width: 100%;
    font-size: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    text-align: center;
}

.auth-animated-page .auth-alert--success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.auth-animated-page .auth-alert--error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.auth-animated-page .auth-remember {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0 4px;
    font-size: 12px;
    color: #555;
}

.auth-animated-page .auth-remember input {
    width: auto;
    margin: 0;
    accent-color: #171717;
}

.auth-animated-page .form-container {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.6s ease-in-out;
}

.auth-animated-page .sign-in {
    left: 0;
    width: 50%;
    z-index: 2;
}

.auth-animated-page .auth-container.active .sign-in {
    transform: translateX(100%);
    pointer-events: none;
}

.auth-animated-page .sign-up {
    left: 0;
    width: 50%;
    opacity: 0;
    z-index: 1;
    pointer-events: none;
}

.auth-animated-page .auth-container.active .sign-up {
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
    pointer-events: auto;
    animation: auth-move 0.6s;
}

@keyframes auth-move {
    0%, 49.99% {
        opacity: 0;
        z-index: 1;
    }
    50%, 100% {
        opacity: 1;
        z-index: 5;
    }
}

.auth-animated-page .social-icons {
    margin: 16px 0;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.auth-animated-page .social-icons .auth-social-icon {
    border: 1px solid #ccc;
    border-radius: 20%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 0 3px;
    width: 40px;
    height: 40px;
    color: #333;
    text-decoration: none;
    background: #fff;
    transition: background 0.2s, border-color 0.2s;
}

.auth-animated-page .social-icons .auth-social-icon:hover {
    background: #f5f5f5;
    border-color: #999;
    text-decoration: none;
}

.auth-animated-page .social-icons .auth-social-icon svg {
    width: 18px;
    height: 18px;
}

.auth-animated-page .toggle-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: all 0.6s ease-in-out;
    border-radius: 150px 0 0 100px;
    z-index: 1000;
}

.auth-animated-page .auth-container.active .toggle-container {
    transform: translateX(-100%);
    border-radius: 0 150px 100px 0;
}

.auth-animated-page .toggle {
    background-color: #171717;
    background: linear-gradient(to right, #525252, #0a0a0a);
    color: #fff;
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: all 0.6s ease-in-out;
}

.auth-animated-page .auth-container.active .toggle {
    transform: translateX(50%);
}

.auth-animated-page .toggle-panel {
    position: absolute;
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 30px;
    text-align: center;
    top: 0;
    transform: translateX(0);
    transition: all 0.6s ease-in-out;
}

.auth-animated-page .toggle-panel h1 {
    color: #fff;
    font-size: 1.6rem;
}

.auth-animated-page .toggle-panel p {
    color: rgba(255, 255, 255, 0.92);
}

.auth-animated-page .toggle-left {
    transform: translateX(-200%);
}

.auth-animated-page .auth-container.active .toggle-left {
    transform: translateX(0);
}

.auth-animated-page .toggle-right {
    right: 0;
    transform: translateX(0);
}

.auth-animated-page .auth-container.active .toggle-right {
    transform: translateX(200%);
}

/* —— Mobile / tablet: same animation, vertical layout —— */
@media (max-width: 768px) {
    .auth-animated-page {
        padding: 12px 12px 24px;
        justify-content: flex-start;
    }

    .auth-animated-page .auth-brand {
        margin-bottom: 12px;
    }

    .auth-animated-page .auth-container {
        width: 100%;
        max-width: 420px;
        height: calc(100dvh - 64px);
        min-height: 560px;
        max-height: 760px;
        border-radius: 24px;
    }

    /*
     * Form 74% + toggle 26%.
     * When .active, toggle slides to the top — form must shift below it
     * so fields are not hidden under the toggle (desktop is side-by-side).
     */
    .auth-animated-page .form-container {
        width: 100%;
        height: 74%;
    }

    .auth-animated-page .sign-in {
        width: 100%;
        left: 0;
        top: 0;
        height: 74%;
        transform: translateX(0);
    }

    .auth-animated-page .auth-container.active .sign-in {
        transform: translateY(100%);
        opacity: 0;
        pointer-events: none;
    }

    .auth-animated-page .sign-up {
        width: 100%;
        left: 0;
        top: 0;
        height: 74%;
        transform: translateX(0);
        opacity: 0;
    }

    .auth-animated-page .auth-container.active .sign-up {
        top: 26%;
        height: 74%;
        transform: translateY(0);
        opacity: 1;
        z-index: 5;
        animation: auth-move 0.6s;
        pointer-events: auto;
    }

    .auth-animated-page .auth-container form {
        padding: 12px 20px 16px;
        justify-content: flex-start;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    .auth-animated-page .auth-container.active .sign-up form {
        padding-bottom: 28px;
    }

    .auth-animated-page .auth-container h1 {
        font-size: 1.25rem;
        margin-top: 0;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .auth-animated-page .social-icons {
        margin: 8px 0;
        flex-shrink: 0;
    }

    .auth-animated-page .auth-container span.auth-hint {
        margin-bottom: 2px;
    }

    .auth-animated-page .toggle-container {
        left: 0;
        top: 74%;
        width: 100%;
        height: 26%;
        border-radius: 0 0 24px 24px;
    }

    .auth-animated-page .auth-container.active .toggle-container {
        /* Move toggle from bottom 26% to top: -(74/26)*100% */
        transform: translateY(-284.615%);
        border-radius: 24px 24px 0 0;
    }

    .auth-animated-page .toggle {
        left: 0;
        top: 0;
        width: 100%;
        height: 200%;
        transform: translateY(-50%);
        background: linear-gradient(to bottom, #525252, #0a0a0a);
    }

    .auth-animated-page .auth-container.active .toggle {
        transform: translateY(0);
    }

    .auth-animated-page .toggle-panel {
        width: 100%;
        height: 50%;
        padding: 12px 18px;
        left: 0;
        right: auto;
    }

    .auth-animated-page .toggle-left {
        top: 0;
        transform: none;
    }

    .auth-animated-page .auth-container.active .toggle-left {
        transform: none;
    }

    .auth-animated-page .toggle-right {
        top: 50%;
        bottom: auto;
        right: auto;
        transform: none;
    }

    .auth-animated-page .auth-container.active .toggle-right {
        transform: none;
    }

    .auth-animated-page .toggle-panel h1 {
        font-size: 1.1rem;
        margin-bottom: 0;
    }

    .auth-animated-page .toggle-panel p {
        font-size: 11px;
        margin: 6px 0 10px;
        line-height: 1.35;
    }

    .auth-animated-page .auth-container button.auth-submit,
    .auth-animated-page .auth-container button.auth-toggle-btn {
        padding: 10px 28px;
        width: auto;
        max-width: 100%;
        margin-top: 8px;
        flex-shrink: 0;
    }

    .auth-animated-page .auth-container input[type="text"],
    .auth-animated-page .auth-container input[type="email"],
    .auth-animated-page .auth-container input[type="tel"],
    .auth-animated-page .auth-container input[type="password"] {
        margin: 4px 0;
        padding: 10px 14px;
        flex-shrink: 0;
    }

    .auth-animated-page .auth-field-error {
        margin: -2px 0 2px;
    }
}

@media (max-width: 380px) {
    .auth-animated-page .auth-container form {
        padding: 10px 14px 14px;
    }

    .auth-animated-page .toggle-panel {
        padding: 10px 14px;
    }

    .auth-animated-page .toggle-panel p {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-animated-page .form-container,
    .auth-animated-page .toggle-container,
    .auth-animated-page .toggle,
    .auth-animated-page .toggle-panel,
    .auth-animated-page .auth-container.active .sign-up {
        transition: none !important;
        animation: none !important;
    }
}

/* —— Single-form auth pages (forgot / reset password) —— */
.auth-animated-page .auth-simple {
    background-color: #fff;
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
    width: 768px;
    max-width: 100%;
    min-height: 420px;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.auth-animated-page .auth-simple__form {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 36px;
    text-align: center;
}

.auth-animated-page .auth-simple__form h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px;
}

.auth-animated-page .auth-simple__form > p {
    font-size: 13px;
    line-height: 1.45;
    color: #666;
    margin: 0 0 20px;
    max-width: 280px;
}

.auth-animated-page .auth-simple__form form {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auth-animated-page .auth-simple__form input[type="email"],
.auth-animated-page .auth-simple__form input[type="password"],
.auth-animated-page .auth-simple__form input[type="text"] {
    background-color: #eee;
    border: none;
    margin: 8px 0;
    padding: 10px 15px;
    font-size: 13px;
    border-radius: 8px;
    width: 100%;
    outline: none;
    font-family: inherit;
}

.auth-animated-page .auth-simple__form input.is-invalid {
    box-shadow: inset 0 0 0 1.5px #dc2626;
}

.auth-animated-page .auth-simple__form .auth-submit {
    background-color: #171717;
    background: linear-gradient(135deg, #525252, #0a0a0a);
    color: #fff;
    font-size: 12px;
    padding: 10px 45px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 14px;
    cursor: pointer;
    font-family: inherit;
}

.auth-animated-page .auth-simple__form .auth-submit:hover {
    filter: brightness(1.08);
}

.auth-animated-page .auth-simple__form .auth-back-link {
    color: #333;
    font-size: 13px;
    text-decoration: none;
    margin-top: 18px;
}

.auth-animated-page .auth-simple__form .auth-back-link:hover {
    text-decoration: underline;
}

.auth-animated-page .auth-simple__panel {
    background: linear-gradient(to right, #525252, #0a0a0a);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 36px 30px;
    border-radius: 150px 0 0 100px;
}

.auth-animated-page .auth-simple__panel h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 12px;
    color: #fff;
}

.auth-animated-page .auth-simple__panel p {
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.3px;
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.92);
    max-width: 240px;
}

.auth-animated-page .auth-simple__panel .auth-toggle-btn {
    background-color: transparent;
    border: 1px solid #fff;
    color: #fff;
    font-size: 12px;
    padding: 10px 45px;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    display: inline-block;
}

.auth-animated-page .auth-simple__panel .auth-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .auth-animated-page .auth-simple {
        width: 100%;
        max-width: 420px;
        min-height: auto;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }

    .auth-animated-page .auth-simple__form {
        padding: 28px 22px 24px;
        order: 1;
    }

    .auth-animated-page .auth-simple__form h1 {
        font-size: 1.35rem;
    }

    .auth-animated-page .auth-simple__panel {
        order: 2;
        border-radius: 0 0 24px 24px;
        padding: 28px 22px;
        background: linear-gradient(to bottom, #525252, #0a0a0a);
        min-height: 160px;
    }

    .auth-animated-page .auth-simple__panel h2 {
        font-size: 1.2rem;
    }

    .auth-animated-page .auth-simple__panel p {
        font-size: 12px;
        margin-bottom: 14px;
    }
}

