/* ============================================================
   MAHA PAY ONLINE — Premium Modern Login Page
   Aesthetic visual overhaul with glowing animations and glassmorphism.
   ============================================================ */

/* ── Fonts & Base ── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

.modern-login-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: #0f172a;
    font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif !important;
    overflow-x: hidden;
    position: relative;
}

/* ── Split Layout ── */
.login-split-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 2;
}

/* ── Left panel (Secure space branding) ── */
.login-left {
    flex: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 50px;
    position: relative;
    background: radial-gradient(circle at 10% 20%, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.97) 90%);
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

/* Digital dot matrix grid overlay for premium engineering aura */
.login-left-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.9;
    z-index: 1;
    pointer-events: none;
}

/* Stunning glowing ambient animated background blobs */
.login-left::before {
    content: '';
    position: absolute;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, rgba(99, 102, 241, 0) 70%);
    border-radius: 50%;
    top: -100px;
    left: -100px;
    animation: floatBlobOne 22s infinite alternate ease-in-out;
    pointer-events: none;
    z-index: 0;
}

.login-left::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, rgba(52, 211, 153, 0) 70%);
    border-radius: 50%;
    bottom: -150px;
    right: -100px;
    animation: floatBlobTwo 26s infinite alternate ease-in-out;
    pointer-events: none;
    z-index: 0;
}

/* Extra purple blob for rich deep mesh gradient aura */
.login-left-orb {
    position: absolute;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.09) 0%, rgba(167, 139, 250, 0) 70%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: floatBlobThree 20s infinite alternate ease-in-out;
    pointer-events: none;
    z-index: 0;
}

@keyframes floatBlobOne {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(60px, 80px) scale(1.15); }
}

@keyframes floatBlobTwo {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-80px, -50px) scale(1.2); }
}

@keyframes floatBlobThree {
    0% { transform: translate(-50%, -50%) scale(1); }
    100% { transform: translate(-20%, -30%) scale(1.1); }
}

/* ── Premium Floating Badges ── */
.floating-badge {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    z-index: 5;
    pointer-events: none;
    user-select: none;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.floating-badge i {
    font-size: 1.1rem;
}

/* RuPay Badge Styling & Position */
.floating-rupay {
    top: 15%;
    left: 8%;
    border: 1px solid rgba(59, 130, 246, 0.25);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), 
                0 0 15px rgba(59, 130, 246, 0.15);
    animation: floatRuPay 7s ease-in-out infinite;
}
.floating-rupay i {
    color: #60a5fa; /* Glowing blue */
}

/* Card Pay Badge Styling & Position */
.floating-card {
    bottom: 22%;
    right: 8%;
    border: 1px solid rgba(139, 92, 246, 0.25);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), 
                0 0 15px rgba(139, 92, 246, 0.15);
    animation: floatCard 8s ease-in-out infinite;
}
.floating-card i {
    color: #a78bfa; /* Glowing purple */
}

/* Aadhaar FP Badge Styling & Position */
.floating-fp {
    top: 32%;
    right: 10%;
    border: 1px solid rgba(16, 185, 129, 0.25);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), 
                0 0 15px rgba(16, 185, 129, 0.15);
    animation: floatFP 6s ease-in-out infinite;
}
.floating-fp i {
    color: #34d399; /* Glowing emerald */
}

/* ── Hardware-Accelerated Floating Keyframes ── */
@keyframes floatRuPay {
    0% {
        transform: translateY(0) rotate(-4deg);
    }
    50% {
        transform: translateY(-15px) rotate(2deg);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25), 
                    0 0 25px rgba(59, 130, 246, 0.3);
    }
    100% {
        transform: translateY(0) rotate(-4deg);
    }
}

@keyframes floatCard {
    0% {
        transform: translateY(0) rotate(4deg);
    }
    50% {
        transform: translateY(-20px) rotate(-1deg);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25), 
                    0 0 25px rgba(139, 92, 246, 0.3);
    }
    100% {
        transform: translateY(0) rotate(4deg);
    }
}

@keyframes floatFP {
    0% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-12px) scale(1.04);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25), 
                    0 0 25px rgba(16, 185, 129, 0.3);
        text-shadow: 0 0 8px rgba(52, 211, 153, 0.5);
    }
    100% {
        transform: translateY(0) scale(1);
    }
}

.login-illustration {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #ffffff;
    max-width: 480px;
}

.main-illustration {
    font-size: 90px;
    margin-bottom: 28px;
    background: linear-gradient(135deg, #60a5fa, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 10px 20px rgba(59, 130, 246, 0.2));
    animation: fadeInUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) both;
}

.brand-title {
    font-size: 3.2rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -1.5px;
    background: linear-gradient(135deg, #ffffff 60%, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) 0.1s both;
}

.brand-subtitle {
    font-size: 1.15rem;
    color: #94a3b8;
    margin-bottom: 45px;
    font-weight: 400;
    letter-spacing: 0.5px;
    animation: fadeInUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) 0.2s both;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: fadeInUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) 0.3s both;
    text-align: left;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.02);
    padding: 16px 24px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.feature-item i {
    font-size: 1.25rem;
    color: #10b981;
    width: 22px;
    flex-shrink: 0;
    text-align: center;
}

.login-left-footer {
    position: absolute !important;
    bottom: 25px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    text-align: center !important;
    color: #64748b !important;
    font-size: 0.82rem !important;
    z-index: 10 !important;
    font-weight: 500;
    animation: fadeInUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) 0.4s both;
}

/* ── Right panel (Login form) ── */
.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 40px;
    background: #f8fafc;
    position: relative;
    overflow: hidden;
}

/* Premium glowing aura behind card */
.login-right::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.04) 0%, rgba(248, 250, 252, 0) 70%);
    border-radius: 50%;
    top: -100px;
    right: -100px;
    pointer-events: none;
    z-index: 0;
}

.login-form-container {
    width: 100%;
    max-width: 460px;
    background: #ffffff;
    padding: 45px 40px;
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.06), 0 0 1px rgba(15, 23, 42, 0.1);
    border: 1px solid rgba(241, 245, 249, 0.8);
    position: relative;
    overflow: hidden;
    z-index: 1;
    animation: cardEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Shifting animated gradient bar at the top */
.login-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #3b82f6, #10b981, #3b82f6);
    background-size: 200% auto;
    animation: breatheGlow 4s linear infinite;
}

@keyframes breatheGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes cardEntrance {
    from { opacity: 0; transform: translateY(30px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Interactive Secure Session Active Pill ── */
.secure-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 30px;
    margin-bottom: 18px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.05);
}

.secure-dot {
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    position: relative;
}

.secure-dot::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #22c55e;
    border-radius: 50%;
    animation: pulseGlow 1.8s infinite;
}

@keyframes pulseGlow {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(3.5); opacity: 0; }
}

/* ── Form header ── */
.login-form-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-form-header h2 {
    font-size: 2.1rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
    letter-spacing: -0.8px;
}

.login-form-header p {
    color: #64748b;
    font-size: 0.92rem;
    font-weight: 500;
    margin: 0;
}

/* ── Form Groups ── */
.modern-login-form .form-group {
    margin-bottom: 20px;
}

.modern-login-form .form-label {
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
    display: block;
    font-size: 0.85rem;
}

/* Input with icon styling */
.input-with-icon {
    position: relative;
}

.input-with-icon > i:first-child {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.05rem;
    z-index: 2;
    pointer-events: none;
    transition: color 0.3s ease;
}

.input-with-icon .form-control,
.input-with-icon select.form-control {
    padding-left: 48px;
    padding-right: 48px;
    height: 52px;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: #f8fafc;
    width: 100%;
    color: #0f172a;
}

.input-with-icon select.form-control {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 18px center;
    background-size: 12px auto;
}

.input-with-icon .form-control:focus,
.input-with-icon select.form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12), inset 0 2px 4px rgba(0, 0, 0, 0.02);
    outline: none;
    background: #ffffff;
    transform: translateY(-1px);
}

.input-with-icon .form-control:focus ~ i:first-child,
.input-with-icon select.form-control:focus ~ i:first-child {
    color: #3b82f6;
}

/* Password Toggle Eye Button */
.pwd-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 6px;
    font-size: 1rem;
    transition: color 0.2s ease;
    z-index: 3;
}
.pwd-toggle:hover { color: #3b82f6; }

/* ── Form Options ── */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    margin-bottom: 24px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 0;
}

/* High-fidelity customized check checkbox */
.form-check-input {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    background: #ffffff;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
}

.form-check-input:checked {
    background: #3b82f6;
    border-color: #3b82f6;
}

.form-check-input:checked::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    color: #ffffff;
    position: absolute;
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-check-label {
    color: #475569;
    font-size: 0.86rem;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
}

.forgot-link {
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 600;
    transition: color 0.2s ease;
}
.forgot-link:hover { color: #1d4ed8; text-decoration: underline; }

/* ── Login Submit Button ── */
.btn-login {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 18px rgba(37, 99, 235, 0.25);
}

.btn-login:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}

.btn-login:active:not(:disabled) {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-login i { transition: transform 0.2s ease; }
.btn-login:hover:not(:disabled) i { transform: translateX(5px); }

/* ── Footer ── */
.login-form-footer {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1.5px solid #f1f5f9;
}

.login-form-footer p {
    margin: 0;
    color: #64748b;
    font-size: 0.86rem;
    font-weight: 500;
}

/* ── Alerts ── */
.alert {
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 22px;
    border: none;
    font-size: 0.86rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.alert-danger  { background: #fef2f2; color: #991b1b; border: 1px solid #fee2e2; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #dcfce7; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fef3c7; }

/* ── Animations ── */
.fadeInUp {
    animation: fadeInUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) both;
}

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

/* ── Responsive ── */
@media (max-width: 992px) {
    .login-split-container { flex-direction: column; }
    .login-left { min-height: 38vh; padding: 50px 24px; }
    .brand-title { font-size: 2.2rem; }
    .main-illustration { font-size: 70px; margin-bottom: 16px; }
    .feature-list { flex-direction: row; flex-wrap: wrap; justify-content: center; }
    .feature-item { font-size: 0.88rem; padding: 12px 18px; }
    .login-form-container { padding: 36px 30px; }
    
    /* Responsive Floating Badges */
    .floating-badge {
        padding: 8px 16px;
        font-size: 0.78rem;
    }
    .floating-rupay {
        top: 8%;
        left: 6%;
    }
    .floating-fp {
        top: 18%;
        right: 6%;
    }
    .floating-card {
        bottom: 12%;
        right: 6%;
    }
}

@media (max-width: 576px) {
    .login-right { padding: 30px 16px; }
    .login-form-container { padding: 32px 20px; border-radius: 20px; }
    .login-form-header h2 { font-size: 1.7rem; }
    .brand-title { font-size: 1.8rem; }
    .login-left { min-height: 32vh; }
    .feature-list { display: none; }
    
    /* Hide floating badges on mobile screens to prevent layout crowding */
    .floating-badge {
        display: none !important;
    }
}
