/* ==========================================
   CSS TRANG TRA CỨU SỬA ĐỔI TRIỆT ĐỂ (.tracuu_page)
   ========================================== */

/* 1. Thiết lập khoảng cách cho Section */
.tracuu_page {
    position: relative;
    padding-top: 140px !important; 
    padding-bottom: 80px !important;
	background:var(--color-main);
}

/* Phủ tối nhẹ ảnh nền của Flatsome */
.tracuu_page .section-bg-overlay {
    background-color: rgba(6, 19, 13, 0.75) !important;
}

/* 2. Khung trắng chứa nội dung */
.tracuu_page .tabbed-content {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

/* 3. Tiêu đề và Breadcrumb tự động đổi màu theo nền (Tránh bị tàng hình chữ) */
.tracuu_page .tabbed-content h4.text-center {
    position: absolute;
    top: -110px; 
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    margin: 0;
    /* Dùng biến màu chính nếu nền trắng, dùng màu trắng nếu nền tối */
    color: #ffff !important; 
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    z-index: 10;
}

/* Nếu bạn đã cài Section nền tối thành công, class này sẽ chuyển tiêu đề sang màu trắng */
.tracuu_page .section-bg-overlay ~ .section-content h4.text-center,
.tracuu_page h4.text-center {
    color: #ffffff !important; 
}

/* Dòng chữ nhỏ Breadcrumb phía trên tiêu đề */
.tracuu_page .tabbed-content h4.text-center::before {
    content: "TRANG CHỦ   >   TRA CỨU THÔNG TIN";
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 2px;
    margin-bottom: 12px;
}

/* 4. Định dạng lại thanh điều hướng Tab */
.tracuu_page .tabbed-content ul.nav {
    display: flex;
    width: 100%;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #ededed;
    background: #ffffff;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    overflow: hidden;
}

/* TRIỆT TIÊU TOÀN BỘ GẠCH TRÊN (BORDER-TOP) MẶC ĐỊNH CỦA FLATSOME */
.tracuu_page .tabbed-content ul.nav li.tab,
.tracuu_page .tabbed-content ul.nav li.tab a,
.tracuu_page .tabbed-content ul.nav li.tab.active,
.tracuu_page .tabbed-content ul.nav li.tab.active a {
    border-top: none !important;
    border-top-width: 0px !important;
}

.tracuu_page .tabbed-content ul.nav li.tab {
    flex: 1;
    text-align: center;
    margin: 0;
}

.tracuu_page .tabbed-content ul.nav li.tab a {
    display: block;
    padding: 22px 15px;
    color: #555555;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-bottom: 4px solid transparent !important;
}

/* Ẩn gạch dưới mặc định chạy động của Flatsome */
.tracuu_page .tabbed-content .nav-line-bottom,
.tracuu_page .tabbed-content .nav-line > li > a::after {
    display: none !important;
}

/* Trạng thái Hover */
.tracuu_page .tabbed-content ul.nav li.tab a:hover {
    color: var(--color-main);
    background-color: #f9f9f9;
}

/* 5. Định dạng Tab Active (CHỈ GIỮ GẠCH DƯỚI) */
.tracuu_page .tabbed-content ul.nav li.tab.active {
    background-color: #f4f6f5 !important; /* Nền xám xanh nhẹ */
    border-top: none !important;
}

.tracuu_page .tabbed-content ul.nav li.tab.active a {
    color: var(--color-main) !important;
    font-weight: 700;
    border-bottom: 4px solid var(--color-main) !important; /* Chỉ hiển thị gạch dưới */
    background-color: transparent !important;
}

/* 6. Phần hiển thị nội dung bên dưới */
.tracuu_page .tab-panels {
    padding: 40px 30px;
    background: #ffffff;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    min-height: 400px;
}

.import-excel-container { font-family: Arial, sans-serif; max-width: 900px; margin: 0 auto; color: #333; }
.import-header h2 { font-size: 20px; color: #0f172a; margin-bottom: 5px; }
.import-header p { color: #64748b; font-size: 14px; margin-bottom: 20px; }

/* Upload Box */
.upload-box { background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px; padding: 40px 20px; text-align: center; margin-bottom: 20px; transition: 0.3s; }
.upload-box.dragover { background: #e2e8f0; border-color: #3b82f6; }
.upload-icon { background: #e0e7ff; width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 15px; }
.upload-box h3 { font-size: 16px; margin-bottom: 5px; color: #1e293b; }
.upload-desc { color: #64748b; font-size: 13px; margin-bottom: 20px; }
.btn-choose-file { background: #166534; color: #fff; border: none; padding: 10px 24px; border-radius: 6px; font-weight: bold; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.btn-choose-file:hover { background: #14532d; }

/* Info Box & History Box */
.info-box, .history-box { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 20px; margin-bottom: 20px; }
.info-title { color: #0f172a; font-size: 16px; margin: 0 0 15px 0; display: flex; align-items: center; gap: 8px; }
.info-title::before { content: "●"; color: #22c55e; font-size: 12px; }
.history-box .info-title::before { color: #3b82f6; }

/* Table */
.sample-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 15px; }
.sample-table th, .sample-table td { border: 1px solid #e2e8f0; padding: 10px; text-align: left; }
.sample-table th { background: #f1f5f9; color: #334155; }
.sample-table th.col-blue { background: #2563eb; color: #fff; }
.sample-table td.col-blue-text { color: #2563eb; font-weight: bold; }

/* History List */
.history-list { list-style: none; padding: 0; margin: 0; }
.history-list li { display: flex; align-items: flex-start; gap: 15px; padding: 10px 0; border-bottom: 1px solid #f1f5f9; }
.history-list li:last-child { border-bottom: none; }
.history-icon { font-size: 24px; }
.history-info strong { display: block; color: #0f172a; font-size: 14px; }
.history-info span { display: block; font-size: 12px; color: #64748b; margin-top: 3px; }
.history-info .status-success { color: #16a34a; }

/* 7. Responsive trên điện thoại */
@media (max-width: 767px) {
    .tracuu_page {
        padding-top: 110px !important;
        padding-bottom: 40px !important;
    }
    .tracuu_page .tabbed-content {
        border-radius: 8px;
    }
    .tracuu_page .tabbed-content h4.text-center {
        font-size: 18px;
        top: -75px;
    }
    .tracuu_page .tabbed-content h4.text-center::before {
        font-size: 9px;
        margin-bottom: 6px;
    }
    .tracuu_page .tabbed-content ul.nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
    }
    .tracuu_page .tabbed-content ul.nav li.tab {
        flex: 0 0 auto;
        min-width: 140px;
    }
    .tracuu_page .tabbed-content ul.nav li.tab a {
        padding: 16px 10px;
        font-size: 12px;
    }
    .tracuu_page .tab-panels {
        padding: 20px 15px;
        border-bottom-left-radius: 8px;
        border-bottom-right-radius: 8px;
    }
}