:root {
            --primary-color: #d30c0b;
            --secondary-color: #E5E7EB;
            --text-color: #374151;
            --light-text-color: #d30c0b;
            --light-bg: #F9FAFB;
        }

        body {
            font-family: 'Be Vietnam Pro', sans-serif;
            margin: 0;
            height: 100vh;
            background-color: var(--light-bg);
            display: flex;
            justify-content: center;
            align-items: center;
            overflow: hidden;
            position: relative;
        }

        .container {
            width: 100%;
            max-width: 1100px;
            margin: 0 auto;
            padding: 2rem;
        }

        .login-grid {
            display: grid;
            grid-template-columns: 1fr;
            align-items: center;
            background: #FFFFFF;
            border-radius: 24px;
            min-width:450px;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
            overflow: hidden;
            animation: floatIn 1.5s ease-in-out;
        }

         
        
        @keyframes floatIn {
            0% { 
                opacity: 0; 
                transform: translateY(50px);
            }
            100% { 
                opacity: 1; 
                transform: translateY(0);
            }
        }

        .left-panel {
            padding: 3rem;
            color: #fff;
            background-image: url('<?php echo base_url(); ?>assets/images/bg.jpg');
            background-size: cover;
            background-position: center;
            text-align: center;
            display: none; /* Hidden on mobile */
        }

        @media (min-width: 992px) {
            .left-panel {
                display: block;
            }
        }

        .left-panel .chibi-animated {
            max-width: 200px;
            margin-bottom: 1.5rem;
            animation: chibiFloat 4s ease-in-out infinite;
        }

        @keyframes chibiFloat {
            0% { transform: translateY(0px); }
            50% { transform: translateY(-15px); }
            100% { transform: translateY(0px); }
        }

        .left-panel h2 {
            font-size: 2rem;
            margin-bottom: 1rem;
        }
        .left-panel p {
            font-size: 1rem;
            line-height: 1.6;
            margin-bottom: 2rem;
            opacity: 0.9;
        }
        .left-panel .ptboi {
            font-size: 0.9rem;
        }
        .left-panel .ptboi a {
            color: #fff;
            font-weight: 600;
        }

        .right-panel {
            padding: 2.5rem;
            color: var(--text-color);
        }

        .form-header {
            text-align: left;
            margin-bottom: 1rem;
        }

        .form-header .logo {
            max-width: 100px;
            height: auto; 
        }

       .form-header h1 {
            margin: 0 0 0.5rem;
            font-size: 22px;
            font-weight: 700;
            color: #d30d0b;
        }
        img.chibi-animated {
            height: 130px;
            float: inline-end;
        }
        .form-group {
            margin-bottom: 1.5rem;
        }
        
        .form-group label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 600;
            font-size: 0.9rem;
        }

        .input-wrapper {
            position: relative;
        }

        .form-input {
            width: 100%;
            padding: 1rem;
            background: var(--light-bg);
            border: 1px solid var(--secondary-color);
            border-radius: 12px;
            color: var(--text-color);
            font-size: 1rem;
            box-sizing: border-box;
            transition: all 0.3s ease;
        }
        
        .form-input:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(169, 46, 91, 0.2);
        }
        
        .toggle-password {
            position: absolute;
            right: 1rem;
            top: 50%;
            transform: translateY(-50%);
            cursor: pointer;
            color: var(--light-text-color);
        }
        .toggle-password img {
            width: 20px;
            height: 20px;
        }

        .options-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
            font-size: 0.9rem;
        }
        
        .remember-me {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .remember-me input[type="checkbox"] {
            width: 1.25em;
            height: 1.25em;
            border-radius: 4px;
            border: 1px solid var(--secondary-color);
            accent-color: var(--primary-color);
        }

        .options-row a {
            color: var(--primary-color);
            text-decoration: none;
            font-weight: 500;
            transition: color 0.3s ease;
        }

        .options-row a:hover {
            text-decoration: underline;
        }

        .login-btn {
            width: 100%;
            padding: 1rem;
            background: var(--primary-color);
            border: none;
            border-radius: 12px;
            color: white;
            font-size: 1.1rem;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .login-btn:hover {
            background-color: #8A2448;
            transform: translateY(-3px);
            box-shadow: 0 10px 20px -10px rgba(169, 46, 91, 0.6);
        }

        .separator {
            display: flex;
            align-items: center;
            text-align: center;
            color: var(--light-text-color);
            margin: 0.3rem 0;
            font-size: 0.9rem;
        }
        .separator::before, .separator::after {
            content: '';
            flex: 1;
            border-bottom: 1px solid var(--secondary-color);
        }
        .separator:not(:empty)::before {
            margin-right: .5em;
        }
        .separator:not(:empty)::after {
            margin-left: .5em;
        }
        
        .extra-actions {
            display: flex;
            gap: 1rem;
        }
        
        .extra-btn {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            padding: 0.75rem;
            border: 1px solid var(--secondary-color);
            border-radius: 12px;
            background: #fff;
            color: var(--text-color);
            text-decoration: none;
            font-weight: 600;
            transition: all 0.3s ease;
        }
        .extra-btn img {
            width: 20px;
            height: 20px;
        }
        
        .extra-btn:hover {
            border-color: var(--primary-color);
            color: var(--primary-color);
            background-color: #FEF2F2;
        }
        p.dev {
            text-align: center;
            margin-top: 20px;
        }
        p.dev a{
             color: var(--primary-color);
             text-decoration: unset;
        }

        /* Responsive cho màn hình di động nhỏ hơn 480px */
        @media (max-width: 480px) {
            body {
                padding: 0;
                overflow: auto;
                display: unset;
            }

            .container {
                width: auto;
                padding: 0;
                min-height: 100vh;
                align-items: center;
                justify-content: center;
            }

            .login-grid {
                min-width:100%;
                width: 100%;
                max-width: 400px;
                margin: 0;
                border-radius: 16px;
                box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
                display: contents;
            }

            .right-panel {
                padding: 1.5rem;
            }

            .form-header {
                text-align: center;
                margin-bottom: 1.5rem;
            }

            .form-header .logo {
                max-width: 80px;
                margin-bottom: 0.5rem;
            }

            .form-header h1 {
                font-size: 18px;
                margin: 0.5rem 0;
            }

            img.chibi-animated {
                height: 100px;
                float: none;
                display: inline-flex;
                margin: 0 auto 1rem;
            }

            .form-group {
                margin-bottom: 1.25rem;
            }

            .form-input {
                padding: 0.875rem;
                font-size: 16px; /* Prevent zoom on iOS */
            }

            .options-row {
                flex-direction: column;
                gap: 0.75rem;
                align-items: flex-start;
                margin-bottom: 1.25rem;
            }

            .remember-me {
                order: 2;
            }

            .options-row a {
                order: 1;
                align-self: flex-end;
            }

            .login-btn {
                padding: 0.875rem;
                font-size: 1rem;
            }

            .extra-actions {
                flex-direction: column;
                gap: 0.75rem;
            }

            .extra-btn {
                padding: 0.625rem;
                font-size: 0.9rem;
            }

            .separator {
                margin: 1rem 0 0.75rem;
            }

            p.dev {
                margin-top: 1rem;
                font-size: 0.85rem;
            }
        }

        /* Responsive cho màn hình rất nhỏ (dưới 360px) */
        @media (max-width: 360px) {
            .container {
                padding: 0.5rem;
            }

            .right-panel {
                padding: 1.25rem;
            }

            .form-header h1 {
                font-size: 16px;
            }

            img.chibi-animated {
                height: 80px;
            }

            .form-input {
                padding: 0.75rem;
            }

            .login-btn {
                padding: 0.75rem;
            }
        }