        /* --- 1. CẤU HÌNH CHUNG --- */
        :root {
            --primary-color: #2563eb;       /* Xanh dương đậm nút bấm */
            --primary-light: #eff6ff;       /* Xanh nhạt nền input khi có chữ */
            --primary-hover: #1e40af;
            --bg-color: #f0f2f5;
            --text-main: #1e293b;
            --text-secondary: #64748b;
            --border-color: #cbd5e1;
            --input-bg: #ffffff;            /* Nền trắng mặc định */
            --error-color: #ef4444;
            --success-color: #10b981;
        }

        * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; }

        body {
            background-color: var(--bg-color);
            background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
            background-size: 24px 24px;
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 20px; 
        }

        /* --- CARD CONTAINER --- */
        .login-container {
            background-color: white;
            width: 900px;
            max-width: 100%;
            min-height: 550px; 
            display: flex;
            border-radius: 12px;
            box-shadow: 0 20px 25px -5px rgba(30, 64, 175, 0.1), 0 10px 10px -5px rgba(30, 64, 175, 0.04);
            overflow: hidden;
        }

        /* --- CỘT TRÁI (HÌNH ẢNH) --- */
        .login-image {
            flex: 1;
            background-image: url('https://images.unsplash.com/photo-1550751827-4bd374c3f58b?q=80&w=1000&auto=format&fit=crop');
            background-size: cover;
            background-position: center;
            position: relative;
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            padding: 40px;
            color: white;
        }

        .image-overlay {
            position: absolute;
            top: 0; left: 0; width: 100%; height: 100%;
            background: linear-gradient(to bottom, rgba(30, 58, 138, 0.4), rgba(30, 58, 138, 0.9));
            z-index: 1;
        }

        .image-text { position: relative; z-index: 2; }
        .image-text h2 { font-size: 26px; margin-bottom: 12px; font-weight: 700; text-shadow: 0 2px 4px rgba(0,0,0,0.3); }
        .image-text p { font-size: 15px; opacity: 0.95; line-height: 1.5; }

        /* --- CỘT PHẢI (FORM) --- */
        .login-form-wrapper {
            flex: 1;
            padding: 40px 50px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            position: relative;
        }

        .brand-title { color: var(--text-secondary); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 10px; }
        .login-title { color: var(--text-main); font-size: 30px; font-weight: 700; margin-bottom: 25px; min-height: 40px;}

        /* --- FORM INPUT STYLE (ĐÃ SỬA) --- */
        .form-group { 
            margin-bottom: 24px; /* Tăng khoảng cách giữa các nhóm input */
        }
        
        .label-flex { 
            display: flex; 
            justify-content: space-between; 
            align-items: center; 
            margin-bottom: 10px; /* Tăng khoảng cách từ chữ xuống ô nhập */
        }
        
        .form-label { 
            color: var(--text-main); 
            font-weight: 600; 
            font-size: 14px; 
            display: block;
            margin-bottom: 10px; /* Tăng khoảng cách cho label đơn lẻ */
        }

        .forgot-password-link { color: var(--primary-color); text-decoration: none; font-weight: 600; font-size: 13px; cursor: pointer; }
        .forgot-password-link:hover { text-decoration: underline; }

        .form-input {
            width: 100%; 
            padding: 14px 16px;
            border: 1px solid var(--border-color); 
            border-radius: 8px;
            background-color: var(--input-bg); /* Mặc định màu trắng */
            font-size: 15px; 
            transition: all 0.2s ease; 
            outline: none; 
            color: var(--text-main);
            font-weight: 500;
        }

        /* Hiệu ứng Focus: Viền xanh */
        .form-input:focus { 
            border-color: var(--primary-color); 
            background-color: var(--primary-light); /* Focus cũng xanh nhạt */
            box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1); 
        }

        /* --- HIỆU ỨNG QUAN TRỌNG: KHI CÓ CHỮ -> ĐỔI MÀU NỀN --- */
        /* :not(:placeholder-shown) nghĩa là "khi không hiện placeholder" = "khi đã có chữ" */
        .form-input:not(:placeholder-shown) {
            background-color: var(--primary-light); /* Màu #eff6ff giống ảnh mẫu */
            border-color: #bfdbfe; /* Viền cũng xanh nhạt theo */
        }

/* --- STYLE CHO Ô NHẬP LIỆU --- */
.form-input {
    width: 100%; 
    padding: 14px 16px;
    border: 1px solid var(--border-color); 
    border-radius: 8px;
    background-color: var(--input-bg);
    font-size: 15px; 
    transition: all 0.2s ease; 
    outline: none; 
    
    /* 1. Cấu hình cho chữ NGƯỜI DÙNG NHẬP VÀO */
    color: #1e293b;     /* Màu đen xám đậm */
    font-weight: 500;   /* Hơi đậm một chút cho rõ */
}

/* --- MỚI THÊM: CẤU HÌNH RIÊNG CHO CHỮ NỀN (PLACEHOLDER) --- */
.form-input::placeholder {
    color: #94a3b8;     /* Màu xám nhạt (Slate-400) */
    font-weight: 400;   /* Nét mỏng, không đậm */
    opacity: 1;         /* Đảm bảo hiển thị đúng trên Firefox */
}

/* Giữ nguyên các hiệu ứng focus và nền xanh đã làm trước đó */
.form-input:focus { 
    border-color: var(--primary-color); 
    background-color: white; 
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1); 
}

.form-input:not(:placeholder-shown) {
    background-color: var(--input-filled-bg); 
    border-color: #bfdbfe; 
}


        .password-container { position: relative; width: 100%; }
        #password { padding-right: 45px; }
        .toggle-password {
            position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
            cursor: pointer; color: #94a3b8; display: flex; align-items: center;
        }
        .toggle-password:hover { color: var(--primary-color); }

        .form-options { margin-bottom: 25px; }
        .remember-me { display: flex; align-items: center; color: var(--text-secondary); cursor: pointer; font-size: 14px; user-select: none; }
        .remember-me input { margin-right: 8px; accent-color: var(--primary-color); width: 16px; height: 16px; cursor: pointer; }

        .btn-submit {
            width: 100%; padding: 14px;
            background-color: var(--primary-color); color: white;
            border: none; border-radius: 8px; font-size: 16px; font-weight: 600;
            cursor: pointer; transition: all 0.3s ease;
            box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
        }
        .btn-submit:hover { background-color: var(--primary-hover); transform: translateY(-2px); }
        .btn-submit:active { transform: scale(0.98); }

        .btn-secondary {
            background-color: white; color: var(--text-secondary); border: 1px solid var(--border-color);
            margin-top: 10px; box-shadow: none;
        }
        .btn-secondary:hover { background-color: #f8fafc; color: var(--text-main); border-color: #94a3b8; }

        .message-area { margin-top: 15px; text-align: center; font-size: 14px; font-weight: 500; min-height: 20px; }
        #error { color: var(--error-color); }
        #ok { color: var(--success-color); }
        #info { margin-top: 10px; font-size: 14px; }

        #forgot-section { display: none; }

        /* --- RESPONSIVE MOBILE (FULL VIỀN) --- */
        @media (max-width: 768px) {
            body { padding: 0; background-color: white; background-image: none; align-items: flex-start; }
            .login-container { width: 100%; min-height: 100vh; border-radius: 0; box-shadow: none; flex-direction: column; margin: 0; }
            
            .login-image {
                display: flex; flex: none; height: 220px; width: 100%; padding: 25px; justify-content: flex-end;
            }
            .image-text h2 { font-size: 22px; }
            .image-text p { font-size: 13px; }

            .login-form-wrapper {
                flex: 1; padding: 30px 25px; justify-content: flex-start; padding-top: 40px;
            }
            .login-title { font-size: 26px; }
        }


/* ... Các style cũ giữ nguyên ... */

/* --- STYLE BÁO LỖI (MỚI) --- */
.input-error {
    border-color: var(--error-color) !important;
    background-color: #fef2f2 !important; /* Nền đỏ rất nhạt */
}

/* Khi ô đang lỗi mà người dùng bấm vào thì vẫn ưu tiên border đỏ hoặc chuyển lại xanh tuỳ logic */
.input-error:focus {
    border-color: var(--error-color) !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1) !important;
}

.error-text {
    color: var(--error-color);
    font-size: 13px;
    margin-top: 6px;
    display: block;
    font-weight: 500;
    opacity: 0; /* Mặc định ẩn */
    transform: translateY(-5px);
    transition: all 0.2s ease;
    height: 0; /* Để không chiếm diện tích khi không có lỗi */
}

.error-text.show {
    opacity: 1;
    transform: translateY(0);
    height: auto;
    margin-bottom: 5px;
}

/* Ẩn vùng báo lỗi chung cũ đi vì không cần nữa */
#error { display: none; }

.shake { animation: shake 0.5s; } @keyframes shake { 0%, 100% { transform: translateX(0); } 25%, 75% { transform: translateX(-5px); } 50% { transform: translateX(5px); } } 

/* Hiệu ứng rung khi bị khóa tài khoản */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}
.shake { animation: shake 0.4s ease-in-out; }

/* Định dạng lại text lỗi cho rõ ràng */
.error-text.show {
    display: block;
    margin-top: 8px;
    font-weight: 500;
    background: rgba(231, 76, 60, 0.1);
    padding: 5px 10px;
    border-radius: 4px;
}
