/* Auth pages — premium shell with public header/footer
   Brand: منصة مشاركة / shared.sa — blue #0045ad
   Scoped to body.fb-auth-page
*/

body.fb-auth-page {
    --fb-auth-blue: #0045ad;
    --fb-auth-blue-deep: #002369;
    --fb-auth-blue-soft: #3d7dff;
    --fb-auth-ink: #122038;
    --fb-auth-muted: #667890;
    --fb-auth-surface: #ffffff;
    --fb-auth-glow: rgba(0, 69, 173, 0.18);
    min-height: 100vh;
    background: #eef3fb;
}

body.fb-auth-page .fb-auth-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Solid public header (v3) on auth */
body.fb-auth-page .header.fb-page-header.v3 {
    position: relative;
    z-index: 30;
    flex-shrink: 0;
    pointer-events: auto;
    isolation: isolate;
    background: linear-gradient(135deg, var(--fb-auth-blue-deep) 0%, var(--fb-auth-blue) 55%, #1a5fd4 100%);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 35, 105, 0.18);
}

body.fb-auth-page .header.fb-page-header.v3::before {
    display: none;
}

body.fb-auth-page .header.fb-page-header.v3 .fb-header.fb-header-pro {
    background: transparent;
    pointer-events: auto;
}

/*
 * v3 header defaults assume a white bar (dark ink). Auth paints a blue bar,
 * so restore light-on-blue nav typography — Library and siblings match.
 */
body.fb-auth-page .header.fb-page-header.v3 .fb-nav-link,
body.fb-auth-page .header.v3 .nav-bar.fb-header-pro .fb-nav-link {
    color: rgba(255, 255, 255, 0.96) !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em;
    opacity: 1 !important;
}

body.fb-auth-page .header.fb-page-header.v3 .fb-nav-link:hover,
body.fb-auth-page .header.v3 .nav-bar.fb-header-pro .fb-nav-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1);
}

body.fb-auth-page .header.fb-page-header.v3 .fb-nav-link::after,
body.fb-auth-page .header.v3 .nav-bar.fb-header-pro .fb-nav-link::after {
    background: #ffffff;
}

body.fb-auth-page .header.fb-page-header.v3 .fb-brand-name,
body.fb-auth-page .header.v3 .nav-bar.fb-header-pro .fb-brand-name {
    color: #ffffff !important;
}

body.fb-auth-page .header.fb-page-header.v3 .language button,
body.fb-auth-page .header.v3 .nav-bar.fb-header-pro .language button {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    font-size: 0.86rem !important;
    font-weight: 600 !important;
}

body.fb-auth-page .header.fb-page-header.v3 .fb-theme-toggle,
body.fb-auth-page .header.v3 .nav-bar.fb-header-pro .fb-theme-toggle,
body.fb-auth-page .header.fb-page-header.v3 .fb-menu-toggle,
body.fb-auth-page .header.v3 .nav-bar.fb-header-pro .fb-menu-toggle {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Upload CTA: blue-on-blue was unreadable; use white chip on auth bar */
body.fb-auth-page .header.fb-page-header.v3 .fb-nav-upload,
body.fb-auth-page .header.v3 .nav-bar.fb-header-pro .fb-nav-upload {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #0045ad !important;
    font-size: 0.86rem !important;
    font-weight: 700 !important;
    box-shadow: 0 0.35rem 0.9rem rgba(0, 20, 60, 0.2);
    pointer-events: auto;
}

body.fb-auth-page .header.fb-page-header.v3 .fb-nav-upload:hover,
body.fb-auth-page .header.v3 .nav-bar.fb-header-pro .fb-nav-upload:hover {
    background: #f0f5ff !important;
    color: #002369 !important;
}

/* Main stage — keep below header so decor never steals header clicks */
body.fb-auth-page .fb-auth-main {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 1 0 auto;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: clamp(2.25rem, 5vw, 3.75rem) 0;
    background:
        radial-gradient(ellipse 80% 55% at 12% 18%, rgba(0, 69, 173, 0.14) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 88% 82%, rgba(61, 125, 255, 0.12) 0%, transparent 50%),
        linear-gradient(165deg, #f5f8ff 0%, #e8eef8 48%, #f0f4fb 100%);
}

body.fb-auth-page .fb-auth-main--plans {
    align-items: flex-start;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* User plans — subscribe / renew / upgrade CTAs (outside .fb-auth-card) */
body.fb-auth-page .user-plans .plan-action {
    margin-top: 1.35rem;
}

body.fb-auth-page .user-plans .plan-action .btn,
body.fb-auth-page .user-plans .plan-action .btn.btn-primary,
body.fb-auth-page .user-plans .plan-action .btn.btn-outline-primary,
body.fb-auth-page .user-plans .plan-action .plan-cta-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 3.15rem;
    padding: 0.8rem 1.15rem !important;
    border: 2px solid #002369 !important;
    border-radius: 0.75rem !important;
    background: #0045ad !important;
    background-color: #0045ad !important;
    background-image: linear-gradient(135deg, #0045ad 0%, #002369 100%) !important;
    box-shadow: 0 0.65rem 1.25rem rgba(0, 69, 173, 0.32) !important;
    color: #ffffff !important;
    font-size: 1.02rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.01em;
    line-height: 1.3;
    text-align: center;
    text-shadow: none !important;
    opacity: 1 !important;
    filter: none !important;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

body.fb-auth-page .user-plans .plan-action .btn:hover,
body.fb-auth-page .user-plans .plan-action .btn:focus,
body.fb-auth-page .user-plans .plan-action .btn:focus-visible,
body.fb-auth-page .user-plans .plan-action .btn.btn-primary:hover,
body.fb-auth-page .user-plans .plan-action .btn.btn-primary:focus,
body.fb-auth-page .user-plans .plan-action .btn.btn-outline-primary:hover,
body.fb-auth-page .user-plans .plan-action .plan-cta-btn:hover,
body.fb-auth-page .user-plans .plan-action .plan-cta-btn:focus {
    background: #002369 !important;
    background-color: #002369 !important;
    background-image: none !important;
    border-color: #001a4d !important;
    color: #ffffff !important;
    opacity: 1 !important;
    filter: none !important;
    transform: translateY(-1px);
    box-shadow: 0 0.85rem 1.45rem rgba(0, 35, 105, 0.4) !important;
}

body.fb-auth-page .user-plans .plan-action .btn:focus-visible,
body.fb-auth-page .user-plans .plan-action .plan-cta-btn:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px rgba(255, 255, 255, 0.95),
        0 0 0 6px rgba(0, 69, 173, 0.45),
        0 0.85rem 1.45rem rgba(0, 35, 105, 0.4) !important;
}

body.fb-auth-page .user-plans .plan.current-plan .plan-action .btn,
body.fb-auth-page .user-plans .plan.current-plan .plan-action .btn.btn-primary,
body.fb-auth-page .user-plans .plan.current-plan .plan-action .plan-cta-btn {
    background: #002369 !important;
    background-color: #002369 !important;
    background-image: linear-gradient(135deg, #002369 0%, #001a4d 100%) !important;
    border-color: #001a4d !important;
    color: #ffffff !important;
}

body.fb-auth-page .user-plans .plan-switcher {
    border-color: #0045ad;
    box-shadow: 0 0.35rem 0.9rem rgba(0, 69, 173, 0.12);
}

body.fb-auth-page .user-plans .plan-switcher .plan-switcher-item {
    font-weight: 700;
    color: #002369;
}

body.fb-auth-page .user-plans .plan-switcher .plan-switcher-item.active {
    background-color: #0045ad;
    color: #ffffff;
}

body.fb-auth-page .fb-auth-container {
    position: relative;
    z-index: 2;
    width: 100%;
}

/* Decorative geometry */
body.fb-auth-page .fb-auth-decor {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

body.fb-auth-page .fb-auth-shape {
    position: absolute;
    display: block;
}

body.fb-auth-page .fb-auth-shape--ring {
    top: 8%;
    inset-inline-start: -4rem;
    width: 14rem;
    height: 14rem;
    border: 2px solid rgba(0, 69, 173, 0.16);
    border-radius: 50%;
    animation: fb-auth-drift 14s ease-in-out infinite;
}

body.fb-auth-page .fb-auth-shape--ring::after {
    position: absolute;
    inset: 1.35rem;
    border: 1px dashed rgba(0, 69, 173, 0.22);
    border-radius: 50%;
    content: "";
}

body.fb-auth-page .fb-auth-shape--blob {
    right: -6rem;
    bottom: 6%;
    width: 18rem;
    height: 18rem;
    border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%;
    background:
        linear-gradient(145deg, rgba(0, 69, 173, 0.16), rgba(61, 125, 255, 0.08));
    filter: blur(2px);
    animation: fb-auth-morph 16s ease-in-out infinite;
}

html[dir="rtl"] body.fb-auth-page .fb-auth-shape--blob {
    right: auto;
    left: -6rem;
}

body.fb-auth-page .fb-auth-shape--grid {
    top: 18%;
    inset-inline-end: 8%;
    width: 7.5rem;
    height: 7.5rem;
    opacity: 0.35;
    background-image:
        linear-gradient(rgba(0, 69, 173, 0.35) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 69, 173, 0.35) 1px, transparent 1px);
    background-size: 14px 14px;
    mask-image: radial-gradient(circle, #000 35%, transparent 75%);
    -webkit-mask-image: radial-gradient(circle, #000 35%, transparent 75%);
    animation: fb-auth-fade 8s ease-in-out infinite;
}

body.fb-auth-page .fb-auth-shape--dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--fb-auth-blue);
    opacity: 0.35;
    box-shadow: 0 0 0 6px rgba(0, 69, 173, 0.08);
}

body.fb-auth-page .fb-auth-shape--dot-a {
    top: 28%;
    inset-inline-end: 22%;
    animation: fb-auth-pulse 3.2s ease-in-out infinite;
}

body.fb-auth-page .fb-auth-shape--dot-b {
    bottom: 22%;
    inset-inline-start: 18%;
    width: 0.4rem;
    height: 0.4rem;
    background: var(--fb-auth-blue-soft);
    animation: fb-auth-pulse 4s ease-in-out infinite 0.6s;
}

body.fb-auth-page .fb-auth-shape--arc {
    top: 55%;
    inset-inline-start: 6%;
    width: 5.5rem;
    height: 5.5rem;
    border: 2px solid transparent;
    border-top-color: rgba(0, 69, 173, 0.28);
    border-inline-end-color: rgba(0, 69, 173, 0.12);
    border-radius: 50%;
    transform: rotate(-25deg);
    animation: fb-auth-spin-slow 22s linear infinite;
}

body.fb-auth-page .fb-auth-shape--mark {
    top: 12%;
    inset-inline-end: 14%;
    width: 5.5rem;
    height: 5.5rem;
    color: var(--fb-auth-blue);
    opacity: 0.55;
    animation: fb-auth-drift 18s ease-in-out infinite reverse;
}

/* Card */
body.fb-auth-page .fb-auth-card {
    position: relative;
    z-index: 1;
    width: min(100%, 440px);
    margin: 0 auto;
    overflow: hidden;
    padding: clamp(1.85rem, 4vw, 2.5rem) clamp(1.4rem, 4vw, 2.15rem);
    border: 2px solid rgba(0, 69, 173, 0.2) !important;
    border-radius: 1.5rem !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 249, 255, 0.96) 100%) !important;
    box-shadow:
        0 1.5rem 3rem rgba(7, 31, 68, 0.14),
        0 0 0 6px rgba(0, 69, 173, 0.06) !important;
    backdrop-filter: blur(8px);
    animation: fb-auth-enter 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

body.fb-auth-page .fb-auth-card::before {
    position: absolute;
    inset: 0 0 auto;
    z-index: 2;
    height: 5px;
    background: linear-gradient(90deg, var(--fb-auth-blue-deep), var(--fb-auth-blue), var(--fb-auth-blue-soft));
    content: "";
}

body.fb-auth-page .fb-auth-card--wide {
    width: min(100%, 680px);
}

/* Brand presence inside card */
body.fb-auth-page .fb-auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.35rem;
}

body.fb-auth-page .fb-auth-brand-name {
    margin: 0;
    color: var(--fb-auth-blue);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.2;
}

html[dir="rtl"] body.fb-auth-page .fb-auth-brand-name {
    letter-spacing: 0.02em;
    text-transform: none;
    font-size: 0.95rem;
}

body.fb-auth-page .fb-auth-badge {
    display: grid;
    width: 3.65rem;
    height: 3.65rem;
    margin: 0.25rem auto 1.05rem;
    place-items: center;
    border: 2px solid rgba(0, 69, 173, 0.16);
    border-radius: 1.05rem;
    color: #fff;
    background: linear-gradient(145deg, var(--fb-auth-blue), var(--fb-auth-blue-deep));
    box-shadow: 0 0.85rem 1.5rem var(--fb-auth-glow);
}

body.fb-auth-page .fb-auth-badge svg {
    width: 1.55rem;
    height: 1.55rem;
}

/* Form polish (overrides auth shell leftovers) */
body.fb-auth-page .sign-body,
body.fb-auth-page .sign {
    display: contents;
}

body.fb-auth-page .fb-auth-card .sign-form,
body.fb-auth-page .fb-auth-card .sign-form.sign-form-lg {
    max-width: none;
    margin: 0;
}

body.fb-auth-page .fb-auth-card .sign-form-header {
    margin-bottom: 1.35rem !important;
    text-align: center;
}

body.fb-auth-page .fb-auth-card .sign-form-title {
    margin: 0 0 0.45rem;
    color: var(--fb-auth-ink) !important;
    font-size: clamp(1.5rem, 3vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

body.fb-auth-page .fb-auth-card .sign-form-text {
    color: var(--fb-auth-muted) !important;
    font-size: 0.95rem !important;
    line-height: 1.55;
}

body.fb-auth-page .fb-auth-card .form-label {
    margin-bottom: 0.35rem;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 700;
}

body.fb-auth-page .fb-auth-card .form-control,
body.fb-auth-page .fb-auth-card .form-select {
    border: 2px solid rgba(0, 35, 105, 0.12) !important;
    border-radius: 0.8rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.fb-auth-page .fb-auth-card .form-control:focus,
body.fb-auth-page .fb-auth-card .form-select:focus {
    border-color: var(--fb-auth-blue) !important;
    box-shadow: 0 0 0 3px rgba(0, 69, 173, 0.14);
}

body.fb-auth-page .fb-auth-forgot {
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Primary CTA — beat global .btn-primary (opacity hover, color inheritance) */
body.fb-auth-page .fb-auth-submit,
body.fb-auth-page .fb-auth-card .btn.btn-primary.btn-lg,
body.fb-auth-page .fb-auth-card button.btn.btn-primary {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 3.4rem;
    padding: 0.85rem 1.35rem !important;
    border: 0 !important;
    border-radius: 0.9rem !important;
    background: #0045ad !important;
    background-color: #0045ad !important;
    background-image: none !important;
    box-shadow: 0 0.75rem 1.35rem rgba(0, 69, 173, 0.32) !important;
    color: #ffffff !important;
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.01em;
    line-height: 1.25;
    opacity: 1 !important;
    filter: none !important;
    text-shadow: none !important;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

body.fb-auth-page .fb-auth-submit:hover,
body.fb-auth-page .fb-auth-submit:focus,
body.fb-auth-page .fb-auth-submit:focus-visible,
body.fb-auth-page .fb-auth-card .btn.btn-primary.btn-lg:hover,
body.fb-auth-page .fb-auth-card .btn.btn-primary.btn-lg:focus,
body.fb-auth-page .fb-auth-card .btn.btn-primary.btn-lg:focus-visible,
body.fb-auth-page .fb-auth-card button.btn.btn-primary:hover,
body.fb-auth-page .fb-auth-card button.btn.btn-primary:focus,
body.fb-auth-page .fb-auth-card button.btn.btn-primary:focus-visible {
    background: #002369 !important;
    background-color: #002369 !important;
    background-image: none !important;
    color: #ffffff !important;
    opacity: 1 !important;
    filter: none !important;
    transform: translateY(-1px);
    box-shadow: 0 0.95rem 1.6rem rgba(0, 35, 105, 0.38) !important;
    outline: none;
}

body.fb-auth-page .fb-auth-submit:focus-visible,
body.fb-auth-page .fb-auth-card .btn.btn-primary.btn-lg:focus-visible,
body.fb-auth-page .fb-auth-card button.btn.btn-primary:focus-visible {
    box-shadow:
        0 0 0 3px rgba(255, 255, 255, 0.9),
        0 0 0 6px rgba(0, 69, 173, 0.45),
        0 0.95rem 1.6rem rgba(0, 35, 105, 0.38) !important;
}

body.fb-auth-page .fb-auth-submit:active,
body.fb-auth-page .fb-auth-card .btn.btn-primary.btn-lg:active,
body.fb-auth-page .fb-auth-card button.btn.btn-primary:active {
    background: #003a94 !important;
    background-color: #003a94 !important;
    color: #ffffff !important;
    opacity: 1 !important;
    transform: translateY(0);
}

/* Header "Sign In" on blue auth bar — undo v3 blue-on-blue outline */
body.fb-auth-page .header.fb-page-header.v3 .fb-btn-signin,
body.fb-auth-page .header.v3 .nav-bar.fb-header-pro .fb-btn-signin {
    border: 1.5px solid rgba(255, 255, 255, 0.92) !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #0045ad !important;
    opacity: 1 !important;
    font-weight: 800 !important;
}

body.fb-auth-page .header.fb-page-header.v3 .fb-btn-signin:hover,
body.fb-auth-page .header.fb-page-header.v3 .fb-btn-signin:focus,
body.fb-auth-page .header.v3 .nav-bar.fb-header-pro .fb-btn-signin:hover,
body.fb-auth-page .header.v3 .nav-bar.fb-header-pro .fb-btn-signin:focus {
    border-color: #ffffff !important;
    background: #0045ad !important;
    background-color: #0045ad !important;
    color: #ffffff !important;
    opacity: 1 !important;
}

body.fb-auth-page .fb-auth-card .login-with {
    margin-top: 1rem;
}

body.fb-auth-page .fb-auth-card .login-with > * {
    margin-bottom: 1rem;
}

body.fb-auth-page .fb-auth-card .login-with .login-with-divider {
    position: relative;
    text-align: center;
}

body.fb-auth-page .fb-auth-card .login-with .login-with-divider::before {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: rgba(0, 35, 105, 0.08);
    transform: translateY(-50%);
    content: "";
}

body.fb-auth-page .fb-auth-card .login-with .login-with-divider span {
    position: relative;
    padding-right: 10px;
    padding-left: 10px;
    background-color: #f7faff;
    color: #777;
}

html[dir="rtl"] body.fb-auth-page .fb-auth-card .form-group .form-control {
    padding-right: 0.75rem;
    padding-left: 60px;
}

html[dir="rtl"] body.fb-auth-page .fb-auth-card .form-group.input-password > button {
    right: auto;
    left: 12px;
}

/* Footer sits naturally under shell */
body.fb-auth-page .fb-footer {
    position: relative;
    z-index: 5;
    flex-shrink: 0;
    margin-top: auto;
}

/* Dark theme */
[data-theme="dark"] body.fb-auth-page,
body.fb-auth-page[data-theme="dark"] {
    background: #0e131b;
}

[data-theme="dark"] body.fb-auth-page .fb-auth-main,
body.fb-auth-page[data-theme="dark"] .fb-auth-main {
    background:
        radial-gradient(ellipse 70% 50% at 15% 20%, rgba(61, 125, 255, 0.12) 0%, transparent 55%),
        linear-gradient(165deg, #121821 0%, #0e131b 100%);
}

[data-theme="dark"] body.fb-auth-page .fb-auth-card,
body.fb-auth-page[data-theme="dark"] .fb-auth-card {
    border-color: rgba(138, 180, 255, 0.28) !important;
    background: linear-gradient(180deg, #1b2230 0%, #141a24 100%) !important;
}

[data-theme="dark"] body.fb-auth-page .fb-auth-card .sign-form-title,
body.fb-auth-page[data-theme="dark"] .fb-auth-card .sign-form-title {
    color: #f4f7fc !important;
}

[data-theme="dark"] body.fb-auth-page .fb-auth-card .sign-form-text,
body.fb-auth-page[data-theme="dark"] .fb-auth-card .sign-form-text {
    color: #aeb9ca !important;
}

[data-theme="dark"] body.fb-auth-page .fb-auth-brand-name,
body.fb-auth-page[data-theme="dark"] .fb-auth-brand-name {
    color: #8ab4ff;
}

[data-theme="dark"] body.fb-auth-page .fb-auth-card .form-label,
body.fb-auth-page[data-theme="dark"] .fb-auth-card .form-label {
    color: #c5d0e0;
}

[data-theme="dark"] body.fb-auth-page .fb-auth-card .login-with-divider span,
body.fb-auth-page[data-theme="dark"] .fb-auth-card .login-with-divider span {
    background-color: #1b2230;
}

[data-theme="dark"] body.fb-auth-page .fb-auth-submit,
[data-theme="dark"] body.fb-auth-page .fb-auth-card .btn.btn-primary.btn-lg,
[data-theme="dark"] body.fb-auth-page .fb-auth-card button.btn.btn-primary,
body.fb-auth-page[data-theme="dark"] .fb-auth-submit,
body.fb-auth-page[data-theme="dark"] .fb-auth-card .btn.btn-primary.btn-lg,
body.fb-auth-page[data-theme="dark"] .fb-auth-card button.btn.btn-primary {
    background: #0045ad !important;
    background-color: #0045ad !important;
    color: #ffffff !important;
    opacity: 1 !important;
}

/* Motion */
@keyframes fb-auth-enter {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fb-auth-drift {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(12px, -10px); }
}

@keyframes fb-auth-morph {
    0%, 100% {
        border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%;
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        border-radius: 55% 45% 42% 58% / 52% 55% 45% 48%;
        transform: translate(-10px, 8px) rotate(8deg);
    }
}

@keyframes fb-auth-pulse {
    0%, 100% { opacity: 0.25; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(1.25); }
}

@keyframes fb-auth-fade {
    0%, 100% { opacity: 0.25; }
    50% { opacity: 0.45; }
}

@keyframes fb-auth-spin-slow {
    to { transform: rotate(335deg); }
}

@media (max-width: 767.98px) {
    body.fb-auth-page .fb-auth-shape--blob {
        width: 12rem;
        height: 12rem;
        opacity: 0.85;
    }

    body.fb-auth-page .fb-auth-shape--mark {
        width: 4rem;
        height: 4rem;
        opacity: 0.4;
    }

    body.fb-auth-page .fb-auth-shape--grid {
        width: 5rem;
        height: 5rem;
    }

    body.fb-auth-page .fb-auth-card {
        padding: 1.5rem 1.1rem;
    }
}

/* Mobile drawer is a light panel — undo blue-bar light text inside it */
@media (max-width: 991.98px) {
    body.fb-auth-page .header.fb-page-header.v3 .fb-nav-links .fb-nav-link,
    body.fb-auth-page .header.v3 .nav-bar.fb-header-pro .fb-nav-links .fb-nav-link {
        color: var(--fb-ink, #122038) !important;
        font-size: 1.02rem !important;
        font-weight: 600 !important;
    }

    body.fb-auth-page .header.fb-page-header.v3 .fb-nav-links .fb-nav-link:hover,
    body.fb-auth-page .header.v3 .nav-bar.fb-header-pro .fb-nav-links .fb-nav-link:hover {
        color: var(--fb-auth-blue, #0045ad) !important;
        background: rgba(0, 69, 173, 0.07);
    }

    body.fb-auth-page .header.fb-page-header.v3 .fb-nav-links .language button,
    body.fb-auth-page .header.v3 .nav-bar.fb-header-pro .fb-nav-links .language button {
        color: var(--fb-ink, #122038) !important;
        border-color: rgba(0, 35, 105, 0.14) !important;
        background: rgba(0, 69, 173, 0.05) !important;
    }

    body.fb-auth-page .header.fb-page-header.v3 .fb-nav-links .fb-theme-toggle,
    body.fb-auth-page .header.v3 .nav-bar.fb-header-pro .fb-nav-links .fb-theme-toggle {
        color: var(--fb-ink, #122038) !important;
        border-color: rgba(0, 35, 105, 0.14) !important;
        background: rgba(0, 69, 173, 0.05) !important;
    }

    body.fb-auth-page .header.fb-page-header.v3 .fb-nav-links .fb-nav-upload,
    body.fb-auth-page .header.v3 .nav-bar.fb-header-pro .fb-nav-links .fb-nav-upload {
        background: linear-gradient(135deg, var(--fb-auth-blue, #0045ad), var(--fb-auth-blue-deep, #002369)) !important;
        color: #ffffff !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.fb-auth-page .fb-auth-card,
    body.fb-auth-page .fb-auth-shape--ring,
    body.fb-auth-page .fb-auth-shape--blob,
    body.fb-auth-page .fb-auth-shape--grid,
    body.fb-auth-page .fb-auth-shape--dot,
    body.fb-auth-page .fb-auth-shape--arc,
    body.fb-auth-page .fb-auth-shape--mark,
    body.fb-auth-page .fb-auth-submit,
    body.fb-auth-page .fb-auth-card .btn.btn-primary.btn-lg {
        animation: none !important;
        transition: none !important;
    }
}

/* Email verify — aligned action buttons */
body.fb-auth-page .fb-verify-header {
    text-align: center;
}

body.fb-auth-page .fb-verify-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

body.fb-auth-page .fb-verify-icon svg {
    width: min(140px, 42vw);
    height: auto;
}

body.fb-auth-page .fb-verify-text {
    color: var(--fb-auth-muted, #667890);
    line-height: 1.55;
}

body.fb-auth-page .fb-verify-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 1.5rem;
    width: 100%;
}

body.fb-auth-page .fb-verify-actions__item {
    display: flex;
    margin: 0;
    min-width: 0;
}

body.fb-auth-page .fb-verify-actions__item form {
    display: flex;
    width: 100%;
    margin: 0;
}

body.fb-auth-page .fb-verify-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100% !important;
    min-height: 48px;
    padding: 0.75rem 1rem !important;
    border-radius: 12px !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    white-space: nowrap;
}

body.fb-auth-page .fb-verify-btn i {
    font-size: 0.9rem;
    opacity: 0.95;
}

body.fb-auth-page .fb-verify-btn--secondary {
    background: #ffffff !important;
    color: var(--fb-auth-blue, #0045ad) !important;
    border: 2px solid rgba(0, 69, 173, 0.28) !important;
    box-shadow: none !important;
    opacity: 1 !important;
}

body.fb-auth-page .fb-verify-btn--secondary:hover,
body.fb-auth-page .fb-verify-btn--secondary:focus {
    background: rgba(0, 69, 173, 0.06) !important;
    border-color: var(--fb-auth-blue, #0045ad) !important;
    color: var(--fb-auth-blue-deep, #002369) !important;
}

body.fb-auth-page .fb-verify-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

body.fb-auth-page .fb-verify-modal .modal-title {
    font-weight: 700;
    color: var(--fb-auth-ink, #122038);
}

@media (max-width: 520px) {
    body.fb-auth-page .fb-verify-actions,
    body.fb-auth-page .fb-verify-modal-actions {
        grid-template-columns: 1fr;
    }
}
