/* CobWeb CRM — shared /login + /register public auth pages */

html.auth-public-html,
body.auth-page-public {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

body.auth-page-public {
    font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f0f2f5;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    min-height: 100vh;
    min-height: 100dvh;
}

body.auth-page-public .background-elements {
    pointer-events: none;
}

body.auth-page-public .auth-page-shell {
    flex: 1 1 auto;
    display: flex;
    width: 100%;
    max-width: 100%;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1rem 1rem;
    box-sizing: border-box;
}

body.auth-page-public .auth-container--public {
    width: 100%;
    max-width: 520px;
    height: auto;
    margin: 0 auto;
    padding: 0;
}

body.auth-page-public .auth-card {
    background: transparent;
    box-shadow: none;
    border: none;
    height: auto;
    width: 100%;
}

body.auth-page-public .auth-body {
    padding: 0;
}

/* Shared page column */
.auth-public-page {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    animation: authPublicFadeIn 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
}

@keyframes authPublicFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-public-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-public-logo {
    display: block;
    max-width: min(320px, 88vw);
    width: 100%;
    height: auto;
    margin: 0 auto 1.5rem;
    object-fit: contain;
}

.auth-public-header h1 {
    font-weight: 800;
    font-size: 2.125rem;
    line-height: 1.3;
    text-align: center;
    color: #1a202c;
    margin: 0 0 0.5rem;
}

.auth-public-subtitle {
    text-align: center;
    color: #475569;
    font-weight: 600;
    font-size: 1.2rem;
    line-height: 1.5;
    margin: 0;
}

/* Global Footer — edge-to-edge full bleed */
.global-footer {
    flex-shrink: 0;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    box-sizing: border-box;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.06);
    --global-footer-height: 64px;
}

.global-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    margin: 0;
    padding: 0.875rem max(1rem, env(safe-area-inset-left)) 0.875rem max(1rem, env(safe-area-inset-right));
    min-height: var(--global-footer-height);
    box-sizing: border-box;
    direction: ltr;
}

.global-footer-social {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex: 0 0 auto;
}

.global-footer-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.global-footer-icon:hover {
    transform: translateY(-2px);
}

.global-footer-icon-whatsapp {
    background: #25d366;
    color: #fff;
}

.global-footer-icon-google {
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.global-footer-googleplay {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    height: 44px;
    padding: 0 0.85rem;
    border-radius: 10px;
    background: #0f172a;
    color: #fff;
    text-decoration: none;
    line-height: 1;
    transition: transform 0.2s ease, background 0.2s ease;
    direction: ltr;
}

.global-footer-googleplay:hover {
    transform: translateY(-2px);
    background: #1e293b;
    color: #fff;
}

.global-footer-googleplay-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
    line-height: 1;
}

.global-footer-googleplay .gp-small {
    font-size: 0.62rem;
    font-weight: 500;
    opacity: 0.9;
    letter-spacing: 0.02em;
}

.global-footer-googleplay .gp-big {
    font-family: 'Rubik', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    margin-top: 1px;
}

.global-footer-center {
    flex: 1 1 auto;
    text-align: center;
    padding: 0 0.5rem;
    direction: rtl;
}

.global-footer-copy {
    font-family: 'Rubik', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: #64748b;
}

.global-footer-legal {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 auto;
    direction: rtl;
}

.global-footer-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0.4rem 0.85rem;
    font-family: 'Rubik', sans-serif;
    font-weight: 700;
    font-size: 0.875rem;
    color: #1e3a5f;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    transition: background 0.2s, border-color 0.2s;
}

.global-footer-link:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}

@media (min-width: 769px) {
    body.auth-page-public .auth-page-shell {
        padding: 2.5rem 1.5rem 1.5rem;
    }

    body.auth-page-public .auth-container--public {
        max-width: 480px;
    }

    .global-footer-inner {
        padding-top: 1rem;
        padding-bottom: 1rem;
        padding-left: max(2rem, env(safe-area-inset-left));
        padding-right: max(2rem, env(safe-area-inset-right));
    }

    .global-footer-copy {
        font-size: 0.95rem;
    }

    .global-footer-link {
        font-size: 0.9rem;
        padding: 0.45rem 1rem;
    }
}

@media (max-width: 768px) {
    .global-footer-inner {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
        direction: rtl;
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }

    .global-footer-social {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .global-footer-center {
        order: 1;
        width: 100%;
        flex: 1 1 100%;
    }

    .global-footer-legal {
        order: 2;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .global-footer-link {
        flex: 1 1 auto;
        max-width: 48%;
    }

    .auth-public-header h1 {
        font-size: 1.75rem;
    }

    .auth-public-subtitle {
        font-size: 1.05rem;
    }

    .auth-public-logo {
        max-width: 260px;
        margin-bottom: 1.25rem;
    }
}
