/* Jibu premium login — scoped to .page-jibu-login */

.page-jibu-login {
    --jibu-primary: #1660B0;        /* Jibu brand royal blue */
    --jibu-primary-deep: #0D4280;   /* Deeper shade for hover */
    --jibu-primary-light: #4DAEE3;  /* Jibu water-ripple sky blue */
    --jibu-accent: #1660B0;         /* Jibu royal blue CTA */
    --jibu-accent-deep: #0D4280;    /* Deeper Jibu blue on hover */
    --jibu-text-dark: #0f172a;
    --jibu-text-muted: #5a6a82;
    --jibu-surface: rgba(255, 255, 255, 0.88);
    --jibu-surface-alt: #f0f5fb;
}

.page-jibu-login,
.page-jibu-login body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--jibu-text-dark);
    overflow-x: hidden;
    background: #061830;
}

/* Fluid Animated Background — Jibu brand blues */
.jibu-login {
    position: relative;
    display: flex;
    min-height: 100vh;
    width: 100%;
    background: linear-gradient(45deg, #061830, #0D4280, #1660B0, #4DAEE3);
    background-size: 400% 400%;
    animation: jibu-gradient-flow 18s ease infinite;
    z-index: 0;
}

@keyframes jibu-gradient-flow {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Background overlay elements (mesh / noise) */
.jibu-login::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    z-index: -1;
    pointer-events: none;
}

/* Hide standard header/footer */
.page-jibu-login .navbar,
.page-jibu-login nav.navbar,
.page-jibu-login header,
.page-jibu-login .page-head,
.page-jibu-login .web-footer,
.page-jibu-login footer {
    display: none !important;
}

.page-jibu-login .page_content,
.page-jibu-login .container,
.page-jibu-login main {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}

.jibu-login__hero {
    position: relative;
    flex: 0 0 55%;
    color: #fff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 56px 64px;
    isolation: isolate;
}

.jibu-login__form {
    flex: 1 1 45%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 48px;
    z-index: 2;
}

/* Brand mark */
.jibu-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 2;
}

.jibu-brand img {
    height: 60px;
    width: auto;
    border-radius: 8px;
    background: #fff;
    padding: 6px 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

.jibu-brand__word {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: 6px;
    color: #fff;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* Slideshow Background */
.jibu-slideshow {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.jibu-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: jibu-slide-fade 24s infinite;
    will-change: opacity, transform;
    transform: scale(1.05);
}

.jibu-slide--one { animation-delay: 0s; }
.jibu-slide--two { animation-delay: 8s; }
.jibu-slide--three { animation-delay: 16s; }

@keyframes jibu-slide-fade {
    0% { opacity: 0; transform: scale(1.05); }
    10% { opacity: 1; }
    33% { opacity: 1; transform: scale(1); }
    43% { opacity: 0; }
    100% { opacity: 0; }
}

.jibu-slideshow-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom,
            rgba(10, 25, 50, 0.65) 0%,
            rgba(10, 25, 50, 0.15) 30%,
            rgba(10, 25, 50, 0.15) 70%,
            rgba(10, 25, 50, 0.6) 100%
        );
    z-index: 1;
}

/* Rotating inspiring statements */
.jibu-tagline {
    position: relative;
    z-index: 2;
    min-height: 110px;
}

.jibu-tagline__kicker {
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 5px;
    opacity: 0.8;
    margin: 0 0 16px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.jibu-tagline__list {
    position: relative;
    height: 72px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.jibu-tagline__item {
    position: absolute;
    inset: 0;
    font-size: 32px;
    font-weight: 300;
    line-height: 1.3;
    margin: 0;
    opacity: 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transform: translateY(16px);
    animation: jibu-fade-swap 25s ease-in-out infinite;
    will-change: opacity, transform;
}

.jibu-tagline__item:nth-child(1) { animation-delay: 0s;   }
.jibu-tagline__item:nth-child(2) { animation-delay: -20s; }
.jibu-tagline__item:nth-child(3) { animation-delay: -15s; }
.jibu-tagline__item:nth-child(4) { animation-delay: -10s; }
.jibu-tagline__item:nth-child(5) { animation-delay: -5s;  }

@keyframes jibu-fade-swap {
    0%, 20%         { opacity: 1; transform: translateY(0); }
    24%, 100%       { opacity: 0; transform: translateY(-16px); }
}

/* Glassmorphic Form Card */
.jibu-card {
    width: 100%;
    max-width: 440px;
    background: var(--jibu-surface);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 24px;
    padding: 48px 44px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
}

.jibu-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 150px;
    background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, transparent 100%);
    pointer-events: none;
}

.jibu-card h4 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--jibu-text-dark);
    letter-spacing: -0.5px;
}

.jibu-card .page-card-head {
    text-align: left;
    padding: 0 0 32px;
    border: none;
    position: relative;
    z-index: 1;
}

.jibu-card .page-card-head .app-logo { display: none; }

.jibu-card .page-card-body { padding: 0; position: relative; z-index: 1; }

/* Floating Labels */
.jibu-card .floating-group {
    position: relative;
    margin-bottom: 24px;
}

.jibu-card .floating-group .form-control {
    width: 100%;
    height: 56px;
    border-radius: 14px;
    border: 1.5px solid rgba(0,0,0,0.1);
    padding: 22px 16px 8px;
    font-size: 16px;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.7);
    color: var(--jibu-text-dark);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.jibu-card .floating-group .form-control:focus,
.jibu-card .floating-group .form-control:not(:placeholder-shown) {
    background: #fff;
    border-color: var(--jibu-primary-light);
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.15);
    outline: none;
}

.jibu-card .floating-group .floating-label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: var(--jibu-text-muted);
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0;
    font-weight: 400;
}

.jibu-card .floating-group .form-control:focus ~ .floating-label,
.jibu-card .floating-group .form-control:not(:placeholder-shown) ~ .floating-label {
    top: 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--jibu-primary);
}

.jibu-card .password-field { position: relative; }

.jibu-card .toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 13px;
    color: var(--jibu-primary);
    font-weight: 600;
    z-index: 2;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.jibu-card .toggle-password:hover {
    background: rgba(29, 78, 216, 0.05);
}

.jibu-card .forgot-password-message {
    margin: -4px 0 24px;
    font-size: 14px;
    text-align: right;
    position: relative;
    z-index: 1;
}

.jibu-card .forgot-password-message a {
    color: var(--jibu-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.jibu-card .forgot-password-message a:hover {
    color: var(--jibu-primary-deep);
}

/* Premium Buttons */
.jibu-card .page-card-actions {
    padding: 0;
    position: relative;
    z-index: 1;
}

.jibu-card .btn-login,
.jibu-card .btn-forgot,
.jibu-card .btn-login-with-email-link {
    width: 100%;
    height: 54px;
    background: var(--jibu-accent);
    background: linear-gradient(135deg, var(--jibu-accent), var(--jibu-accent-deep));
    border: none;
    color: #fff;
    border-radius: 14px;
    font-size: 16px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(22, 96, 176, 0.35);
    position: relative;
    overflow: hidden;
}

.jibu-card .btn-login::after,
.jibu-card .btn-forgot::after,
.jibu-card .btn-login-with-email-link::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: skewX(-20deg);
    transition: left 0.5s ease;
}

.jibu-card .btn-login:hover::after,
.jibu-card .btn-forgot:hover::after,
.jibu-card .btn-login-with-email-link:hover::after {
    left: 150%;
}

.jibu-card .btn-login:hover,
.jibu-card .btn-forgot:hover,
.jibu-card .btn-login-with-email-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(22, 96, 176, 0.45);
}

.jibu-card .btn-login:active { transform: translateY(1px); box-shadow: 0 4px 8px rgba(22, 96, 176, 0.2); }

/* Social Logins */
.jibu-card .social-logins { margin-top: 28px; position: relative; z-index: 1; }

.jibu-card .login-divider {
    position: relative;
    color: var(--jibu-text-muted);
    font-size: 13px;
    font-weight: 500;
    margin: 24px 0 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.jibu-card .login-divider::before,
.jibu-card .login-divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: rgba(0,0,0,0.08);
}

.jibu-card .login-divider::before { left: 0; }
.jibu-card .login-divider::after  { right: 0; }

.jibu-card .btn-login-option {
    height: 52px;
    border-radius: 14px;
    border: 1.5px solid rgba(0,0,0,0.08);
    background: rgba(255,255,255,0.8);
    color: var(--jibu-text-dark);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 15px;
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.jibu-card .btn-login-option:hover {
    border-color: var(--jibu-primary);
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.jibu-card .sign-up-message {
    text-align: center;
    margin-top: 24px;
    font-size: 15px;
    color: var(--jibu-text-muted);
    position: relative;
    z-index: 1;
}

.jibu-card .sign-up-message a {
    color: var(--jibu-primary);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s;
}

.jibu-card .sign-up-message a:hover {
    color: var(--jibu-primary-deep);
}

/* Sections visibility toggle */
.jibu-login section.for-signup,
.jibu-login section.for-forgot,
.jibu-login section.for-email-login,
.jibu-login section.for-login-with-email-link {
    display: none;
}

.jibu-login:not([data-route="login"]) .for-login { display: none; }
.jibu-login[data-route="signup"]   .for-signup    { display: block; animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.jibu-login[data-route="forgot"]   .for-forgot    { display: block; animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.jibu-login[data-route="login-with-email-link"] .for-login-with-email-link { display: block; animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1); }

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 992px) {
    .jibu-login { flex-direction: column; }
    .jibu-login__hero {
        flex: 0 0 auto;
        min-height: 45vh;
        padding: 40px 32px;
        align-items: center;
        text-align: center;
    }
    .jibu-login__form {
        flex: 1 1 auto;
        padding: 0 24px 48px;
        align-items: flex-start;
        margin-top: -40px;
    }

    .jibu-tagline__item { font-size: 24px; text-align: center; width: 100%; }
    .jibu-card { padding: 40px 32px; border-radius: 20px; box-shadow: 0 20px 40px rgba(0,0,0,0.2); }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .jibu-login, .jibu-slide, .jibu-tagline__item, .jibu-card .btn-login::after {
        animation: none !important;
        transition: none !important;
    }
    .jibu-tagline__item { opacity: 1; transform: none; }
    .jibu-tagline__item:not(:first-child) { display: none; }
}
