﻿/* ========== BODY CHUNG ========== */

.body {
    background: #faf6f0;
    width: 100%;
    min-height: 100%;
    padding: 32px 0;
}

/* ========== FILTER ========== */

.vb-search-box {
    font-size: 13px;
    margin-bottom: 16px;
}

/* Grid 6 ô: 3 cột x 2 hàng */
.vb-search-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 16px;
    row-gap: 12px;
}

.vb-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vb-field label {
    font-family: Inter;
    font-weight: 400;
    font-size: 16px;
    line-height: 160%;
    letter-spacing: 0px;
    color: var(--Text-Neutral-Default, rgba(48, 48, 48, 1));
}

.vb-input {
    width: 100%;
    height: 36px;
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    background: #ffffff;
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
}

.vb-input:focus {
    border-color: #3f51b5;
    box-shadow: 0 0 0 1px rgba(63, 81, 181, 0.15);
}

/* Dòng riêng của nút Tìm kiếm */
.vb-search-actions {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Nút Tìm kiếm */
.vb-btn-search {
    height: 36px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 4px;
    border: 1px solid rgba(13, 71, 161, 0.1);
    background: rgba(13, 71, 161, 0.1);
    color: rgba(13, 71, 161, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
    font-family: Inter;
    line-height: 160%;
    letter-spacing: 0px;
    vertical-align: middle;
    transition: background 0.2s, color 0.2s;
}

.vb-btn-search:hover {
    background: rgba(13, 71, 161, 1);
    color: #fff;
}

/* Nút Xoá bộ lọc */
.vb-btn-clear {
    height: 36px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    border: 1px solid #6c757d;
    background: transparent;
    color: #6c757d;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
    font-family: Inter;
}

.vb-btn-clear:hover {
    background: #6c757d;
    color: #fff;
}

.btn-icon {
    font-size: 14px;
}

/* Đường kẻ ngăn filter với bảng */
.vb-divider {
    border: none;
    border-top: 1px solid rgba(48, 48, 48, 0.15);
    margin: 16px 0 20px;
}

/* ========== BẢNG VĂN BẢN ========== */

.vb-table-wrapper {
    background: #ffffff;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.vb-table {
    width: 100%;
    min-width: 1000px;
    border-collapse: collapse;
    font-size: 13px;
    table-layout: fixed;
}

.vb-table thead {
    background: #f5f5f5;
}

.vb-table th,
.vb-table td {
    padding: 10px 16px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: middle;
}

.vb-table th {
    font-family: Inter;
    font-weight: 700;
    font-style: Bold;
    font-size: 14px;
    line-height: 160%;
    letter-spacing: 0px;
    color: var(--Text-Neutral-Default, rgba(48, 48, 48, 1));
}

.vb-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.vb-table tbody tr:hover {
    background: #eef4ff;
}

.vb-table th:nth-child(5),
.vb-table td:nth-child(5) {
    text-align: left !important;
}

.vb-table td a {
    color: #303030;
    text-decoration: none;
}

.vb-table td a:hover,
.vb-table td a:focus {
    color: #0d47a1;
    text-decoration: underline;
}

.vb-table th:nth-child(1),
.vb-table td:nth-child(1) {
    width: 40px!important;
    text-align: center;
}

.vb-table th:nth-child(2),
.vb-table td:nth-child(2) {
    width: 120px!important;
}

.vb-table th:nth-child(3),
.vb-table td:nth-child(3) {
    width: 35%;
}

.vb-table th:nth-child(4),
.vb-table td:nth-child(4) {
    width: 150px;
}

.vb-table th:nth-child(5),
.vb-table td:nth-child(5) {
    width: 110px;
}

.vb-table th:nth-child(6),
.vb-table td:nth-child(6) {
    width: 150px;
    text-align: left;
}

.vb-table td {
    word-break: break-all !important;
    white-space: normal;
    vertical-align: top;
}

/* Cột Trích yếu */
.vb-table td:nth-child(3) {
    line-height: 1.5;
}

/* Nút tải file */
.vb-btn-download {
    border: none;
    background: #e5f0ff;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* ========== PHÂN TRANG ========== */
#pager {
    margin-top: 12px;
}

.vb-pagination {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

.vb-pagination .page-link {
    font-size: 13px;
    padding: 6px 10px;
    min-width: 32px;
    text-align: center;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 991.98px) {
    .vb-search-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .body {
        padding: 16px 0;
		width: 100vw;
    }

    .vb-search-grid {
        grid-template-columns: 1fr;
    }

    .vb-search-actions {
        justify-content: flex-start;
        margin-top: 8px;
    }

    .vb-btn-search {
        width: 100%;
        justify-content: center;
    }

    /* Table scroll on mobile */
    .vb-table-wrapper {
        margin: 0 -12px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .vb-pagination {
        justify-content: center;
    }
}

@media (max-width: 575.98px) {
    .safe-area {
        padding: 0 12px;
    }
}