/* ============================================================
   STYLE.CSS - Giao diện trang lớn 2 cột cho Bước 2
   ============================================================ */

body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background-color: #f8fafc; }
.hero-bg { background-color: #0d47a1; }

/* Menu */
.nav-menu a { position: relative; transition: color 0.3s; }
.nav-menu a::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px; background: #0d47a1; transition: width 0.3s; }
.nav-menu a:hover::after, .nav-menu a.active::after { width: 100%; }

.bank-card { transition: all 0.3s ease; }
.bank-card:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08); border-color: #0d47a1; }

/* Seeding Toast */
#toastContainer { max-width: 380px; width: 100%; z-index: 9999; }
.toast-item {
    background: white; padding: 14px 18px; border-radius: 14px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border: 1px solid #f1f5f9; display: flex; align-items: flex-start; gap: 12px;
    animation: slideInLeft 0.5s ease forwards; transition: all 0.3s ease; position: relative; overflow: hidden;
}
.toast-item::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, #10b981, #059669); }
.toast-item .toast-icon { width: 36px; height: 36px; background: #ecfdf5; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #059669; font-size: 16px; }
.toast-item .toast-content { flex: 1; min-width: 0; }
.toast-item .toast-content p { font-size: 14px; color: #1e293b; line-height: 1.4; margin: 0; }
.toast-item .toast-content .toast-time { font-size: 12px; color: #94a3b8; margin-top: 4px; display: block; }
@keyframes slideInLeft { from { transform: translateX(-120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOutLeft { from { transform: translateX(0); opacity: 1; } to { transform: translateX(-120%); opacity: 0; } }
.toast-item.hiding { animation: slideOutLeft 0.4s ease forwards; }

/* Modal */
.login-modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); z-index: 1000; align-items: center; justify-content: center; backdrop-filter: blur(4px);
    overflow-y: auto; padding: 12px;
}
.login-modal.show { display: flex; }

.login-box {
    background: #ffffff; border-radius: 20px; padding: 32px 28px; width: 100%; max-width: 420px; 
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4); position: relative; transition: all 0.3s ease-in-out;
    max-height: 92vh; overflow-y: auto; margin: auto;
}

/* Kích thước rộng lớn cho Bước 2 (Chữ nhật đứng sang trọng y như ảnh mẫu) */
.login-box.wide-mode {
    max-width: 520px !important;
    width: 95% !important;
    padding: 36px 32px !important;
}

.login-box::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, #0d47a1, #42a5f5, #0d47a1); }

.bank-selected-info { text-align: center; margin-bottom: 16px; }
.selected-bank-logo { width: 70px; height: 70px; margin: 0 auto 8px; border-radius: 50%; border: 2px solid #e2e8f0; display: flex; align-items: center; justify-content: center; background: #f8fafc; overflow: hidden; }
.selected-bank-logo img { width: 45px; height: 45px; object-fit: contain; }
#selectedBankName { color: #1e293b; font-weight: 700; font-size: 18px; margin: 4px 0 2px; }
.divider { border-top: 1px solid #e2e8f0; margin: 12px 0 16px; }
.login-box .sub-title { text-align: center; color: #64748b; font-size: 14px; margin-bottom: 20px; }
.login-box .input-group { margin-bottom: 16px; }
.login-box .input-group label { display: block; font-size: 13px; font-weight: 600; color: #334155; margin-bottom: 5px; }
.login-box .input-group input { width: 100%; padding: 12px 16px; border: 2px solid #e2e8f0; border-radius: 12px; font-size: 15px; transition: all 0.3s; background: white; }
.login-box .input-group input:focus { outline: none; border-color: #0d47a1; box-shadow: 0 0 0 4px rgba(13, 71, 161, 0.1); }
.login-box .input-group input.error { border-color: #ef4444; background: #fef2f2; }

.login-box .btn-login { width: 100%; padding: 14px; background: #0d47a1; color: white; border: none; border-radius: 12px; font-weight: 700; font-size: 16px; cursor: pointer; transition: all 0.3s; margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.login-box .btn-login:hover { background: #1565c0; transform: translateY(-1px); }
.login-box .btn-close { position: absolute; top: 14px; right: 16px; background: none; border: none; font-size: 22px; color: #94a3b8; cursor: pointer; transition: color 0.2s; z-index: 10; }
.login-box .btn-close:hover { color: #ef4444; }

.error-msg { color: #dc2626; font-size: 14px; text-align: center; margin-top: 12px; display: none; background: #fef2f2; padding: 10px 14px; border-radius: 10px; border: 1px solid #fecaca; }

/* ============================================================
   BẢNG CHỌN GÓI 2 CỘT (GIỐNG HỆT ẢNH MẪU)
   ============================================================ */
.packages-grid-2cols {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.pkg-box {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pkg-box:hover {
    border-color: #2563eb;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
    transform: translateY(-2px);
}

.pkg-box.full-width {
    grid-column: span 2;
}

.pkg-top {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 2px;
}

.pkg-num-big {
    font-size: 36px;
    font-weight: 900;
    color: #1e3a8a;
    line-height: 1;
}

.pkg-time-unit {
    font-size: 12px;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 0.5px;
}

.pkg-name {
    font-size: 15px;
    font-weight: bold;
    color: #1e293b;
    margin-bottom: 2px;
}

.pkg-sub {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 12px;
}

.pkg-action {
    font-size: 13px;
    font-weight: 700;
    color: #2563eb;
    margin-top: auto;
}

.pkg-badge-blue {
    position: absolute;
    top: -10px;
    right: 12px;
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 10px;
    border-radius: 20px;
}

.pkg-badge-green {
    position: absolute;
    top: -10px;
    right: 12px;
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 10px;
    border-radius: 20px;
}

@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-10px); } 40% { transform: translateX(10px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(6px); } }
.shake { animation: shake 0.4s ease-in-out; }

/* Loading & Success Animation */
.spinner-container { display: flex; justify-content: center; align-items: center; margin-top: 10px; }
.loading-spinner { width: 50px; height: 50px; border: 4px solid #e5e7eb; border-top: 4px solid #2563eb; border-radius: 50%; animation: spin 1s cubic-bezier(0.55, 0.15, 0.45, 0.85) infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.progress-bar-container { width: 100%; height: 6px; background-color: #f1f5f9; border-radius: 10px; overflow: hidden; margin: 0 auto; }
.progress-bar-fill { height: 100%; background-color: #2563eb; width: 0%; border-radius: 10px; transition: width 0.2s ease-out; }
.success-icon-container { width: 70px; height: 70px; background: white; border: 4px solid #16a34a; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto; color: #16a34a; font-size: 35px; }

/* ============================================================
   TỐI ƯU GIAO DIỆN LƯỚI ỨNG DỤNG CHO CẢ MOBILE VÀ DESKTOP
   ============================================================ */

#bankGrid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.bank-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.bank-card:hover {
    border-color: #2563eb;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
    transform: translateY(-3px);
}

/* Responsive cho màn hình máy tính bảng và điện thoại */
@media (max-width: 1024px) {
    #bankGrid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    #bankGrid {
        grid-template-columns: repeat(3, minmax(0, 1fr)); /* Chia 3 cột gọn gàng trên mobile giống ảnh ngân hàng */
        gap: 10px;
    }
    
    .bank-card {
        padding: 14px 8px;
        border-radius: 12px;
    }
    
    /* Ẩn bớt phần mô tả dài, chỉ giữ lại logo và tên ứng dụng khi xem trên mobile */
    .bank-card .app-desc {
        display: none !important;
    }
    
    .bank-card .app-name {
        font-size: 12px;
        margin-top: 6px;
        font-weight: 600;
        color: #1e293b;
        line-height: 1.2;
    }
}
/* HIỆU ỨNG CHẠY LOGO ĐỐI TÁC (MARQUEE) */
@keyframes marquee {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}

.animate-marquee {
    display: flex;
    width: max-content;
    animation: marquee 60s linear infinite;
}

/* Dừng chuyển động khi rê chuột vào dải logo */
.marquee-container:hover .animate-marquee {
    animation-play-state: paused;

}

/* --- CỐ ĐỊNH ĐẦU TRANG (HEADER) --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* --- CỐ ĐỊNH CUỐI TRANG (FOOTER & DẢI LOGO ĐỐI TÁC) --- */
.fixed-footer-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: #ffffff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

/* --- TẠO KHOẢNG TRỐNG CHO NỘI DUNG GIỮA TRANG --- */
/* Tránh bị header và footer che mất nội dung phần đầu và phần cuối */
body {
    padding-top: 130px;   /* Khoảng trống đẩy nội dung xuống dưới Header cố định */
    padding-bottom: 140px; /* Khoảng trống đẩy nội dung lên trên Footer cố định */
}