/* ============================================================
   ViaaMeetApp — auth.css
   Login & Signup Page Styles
   ============================================================ */

.auth-page {
    /* DO NOT use overflow:hidden — it clips the signup form */
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
}

/* ---------- Layout ---------- */
.auth-layout {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    height: 100vh;
    /* lock to viewport height */
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    /* prevent full-page scroll; columns scroll independently */
}

/* ---------- Brand Panel (left) ---------- */
.auth-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 4rem 3rem 5vw;
    position: relative;
    overflow-y: auto;
    /* scroll on short screens */
    overflow-x: hidden;
}

.auth-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(56, 189, 248, 0.05));
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 3.5rem;
    text-decoration: none;
}

.brand-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.brand-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 12px rgba(37, 99, 235, 0.4));
}

.brand-name {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
}

.brand-name .accent {
    background: linear-gradient(135deg, #2563EB, #38BDF8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-headline {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    background: linear-gradient(160deg, #fff 60%, rgba(255, 255, 255, 0.5));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-sub {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 2.5rem;
    max-width: 360px;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.brand-feat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.65);
}

.feat-icon {
    font-size: 1.1rem;
}

/* Stats (signup page) */
.brand-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.stat-num {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #2563EB, #38BDF8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
}

/* ---------- Auth Card Wrap (right) ---------- */
.auth-card-wrap {
    display: flex;
    align-items: flex-start;
    /* allow card to grow beyond viewport */
    justify-content: center;
    padding: 2rem 4rem 3rem 3rem;
    overflow-y: auto;
    /* scroll if form is taller than screen */
    min-height: 100vh;
    /* fill full height */
    box-sizing: border-box;
}

/* Center the card vertically when there's enough space */
@media (min-height: 800px) {
    .auth-card-wrap {
        align-items: center;
    }
}

/* ---------- Auth Card ---------- */
.auth-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 2.5rem 2.25rem;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    margin-bottom: 1.75rem;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.3rem;
}

.auth-desc {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ---------- Auth Form ---------- */
.auth-form {
    display: flex;
    flex-direction: column;
}

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.forgot-link {
    font-size: 0.82rem;
    color: var(--primary-light);
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: var(--accent);
}

/* ---------- Divider ---------- */
.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.25rem 0;
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.8rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

/* ---------- Social buttons ---------- */
.social-btns {
    display: flex;
    gap: 0.75rem;
}

.btn-social {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    transition: all 0.25s;
    cursor: pointer;
}

.btn-social:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* ---------- Auth switch ---------- */
.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.5);
}

.switch-link {
    color: var(--primary-light);
    font-weight: 600;
    transition: color 0.2s;
}

.switch-link:hover {
    color: var(--accent);
}

/* ---------- Avatar Upload ---------- */
.avatar-upload-wrap {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: all 0.25s;
    position: relative;
}

.avatar-upload-wrap:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
}

.avatar-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.avatar-preview {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.av-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.av-sub {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
}

/* ---------- Password Strength ---------- */
.pass-strength {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.strength-bars {
    display: flex;
    gap: 3px;
}

.bar {
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.1);
    transition: background 0.35s;
}

.bar.weak {
    background: var(--danger);
}

.bar.fair {
    background: var(--warning);
}

.bar.good {
    background: #22C55E;
}

.bar.strong {
    background: #22C55E;
}

.strength-label {
    font-size: 0.75rem;
    color: var(--text-3);
}

/* ---------- Terms label ---------- */
.terms-label {
    margin-bottom: 1.25rem;
    font-size: 0.82rem;
}

/* ---------- Submit loader ---------- */
.btn-loader {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .auth-layout {
        grid-template-columns: 1fr;
        min-height: 100vh;
    }

    .auth-brand {
        display: none;
    }

    .auth-card-wrap {
        padding: 1.5rem;
        min-height: 100vh;
        align-items: flex-start;
    }

    .auth-card {
        max-width: 100%;
    }
}

/* ---- Very small screens — ensure form is always fully scrollable ---- */
@media (max-height: 750px) {
    .auth-card-wrap {
        align-items: flex-start;
        padding-top: 1.5rem;
        padding-bottom: 2rem;
    }
}