body {
    font-size: 14px;
}

.table td,
.table th {
    vertical-align: middle;
}

.ajax-list {
    min-height: 0;
}

.sticky-top {
    top: 0;
    z-index: 2;
}

.dynamic-field-wrap textarea {
    min-height: 90px;
}

thead.table-light.sticky-top th,
.table>thead.table-light.sticky-top>tr>th {
    text-align: center !important;
    vertical-align: middle;
}

.drag-handle {
    user-select: none;
    font-weight: bold;
}

.sortable-ghost {
    opacity: 0.4;
    background: #f8f9fa;
}

.sortable-chosen {
    background: #fff3cd;
}

/* FIX khoảng trống dưới bảng */
.scroll-table {
    display: block;
    width: 100%;
    max-height: none;
    min-height: 0;
    overflow-x: auto;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    background: #fff;
}

/* Chỉ trong tab public/admin mới giới hạn chiều cao để có cuộn dọc */
#list-all .scroll-table,
#list-completed .scroll-table,
.ajax-list[data-dia-ban] .scroll-table,
#admin-list .scroll-table {
    max-height: 70vh;
}

/* Nếu bảng ngắn thì khung không tạo khoảng trống thừa */
.scroll-table .table {
    margin-bottom: 0;
}

.fixed-layout-table {
    table-layout: fixed;
    width: max-content;
    min-width: 100%;
    margin-bottom: 0;
}

.fixed-layout-table th,
.fixed-layout-table td {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.fixed-layout-table td {
    line-height: 1.35;
}

.custom-public-tabs .nav-link {
    color: #000 !important;
    border: 1px solid #dee2e6;
    margin-right: 4px;
}

.custom-public-tabs .nav-link.active {
    background: var(--bs-primary) !important;
    color: #fff !important;
    border-color: var(--bs-primary) !important;
}

.import-result-box .section-title {
    font-weight: 700;
    margin-top: 8px;
}

.import-result-box ul {
    margin: 4px 0 8px 18px;
    padding: 0;
}

.sortable-header {
    cursor: pointer;
    user-select: none;
}

.sortable-header:hover {
    background: #e9ecef !important;
}

.sort-header-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.sort-indicator {
    font-size: 12px;
    line-height: 1;
    color: #6c757d;
    min-width: 12px;
}

.dashboard-card {
    transition: transform .15s ease, box-shadow .15s ease;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .08) !important;
}

.dashboard-chart-wrap {
    position: relative;
    height: 280px;
}

.dashboard-chart {
    width: 100% !important;
    height: 100% !important;
}

.dashboard-progress {
    height: 16px;
    border-radius: 999px;
}

/* Tab content không giữ khoảng trắng thừa */
.tab-content,
.tab-pane,
.ajax-list {
    height: auto;
    min-height: 0;
}

/* Responsive mượt hơn */
.table-responsive {
    margin-bottom: 0;
}

