body {
    font-family: Arial, sans-serif;
    background: #f0f2f5;
}

/* Font nhỏ gọn */
#helpContent, .sidebar a, .sidebar-link, .tab-switch {
    font-size: 14px;
    line-height: 1.6;
}

/* Nút mở trợ giúp */
#helpButton {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: #0d6efd;
    color: white;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s;
}
#helpButton:hover {
    transform: scale(1.1);
}

/* Cửa sổ floating */
#helpWindow {
    display: none;
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 950px;
    max-width: 95vw;
    height: 80vh;
    min-width: 600px;
    min-height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    z-index: 999;
    flex-direction: column;
    resize: both; /* Native resizable */
}

/* Resize handle */
#helpWindow::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    border-bottom: 3px solid #0d6efd;
    border-right: 3px solid #0d6efd;
    cursor: se-resize;
}

#helpHeader {
    background: #0d6efd;
    color: white;
    padding: 12px 20px;
    cursor: move;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
}
#closeHelp {
    cursor: pointer;
    font-size: 20px;
}

/* Layout chính */
#helpMain {
    display: flex;
    flex: 1;
    overflow: hidden;
}
.sidebar {
    width: 280px;
    background: #f8f9fa;
    border-right: 1px solid #dee2e6;
    overflow-y: auto;
    padding: 15px 0;
}
.sidebar h6 {
    padding: 0 20px;
    font-weight: bold;
    color: #0d6efd;
    margin: 15px 0 8px 0;
}
.sidebar-link {
    padding: 8px 20px;
    display: block;
    color: #495057;
    text-decoration: none;
    border-left: 3px solid transparent;
    cursor: pointer;
    user-select: none;
}
.sidebar-link:hover, .sidebar-link.active {
    background: #e3f2fd;
    border-left: 3px solid #0d6efd;
    color: #0d6efd;
}

/* Collapsible sidebar groups */
.sidebar-group {
    margin-bottom: 8px;
}

.sidebar-header {
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: bold;
    color: #0d6efd;
    cursor: pointer;
    user-select: none;
    border-radius: 6px;
    transition: background 0.2s;
}

.sidebar-header:hover {
    background: #e3f2fd;
}

.toggle-icon {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.sidebar-header.expanded .toggle-icon {
    transform: rotate(90deg); /* right → down */
}

.sidebar-group-content {
    max-height: 1000px; /* đủ lớn để chứa tất cả item */
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.sidebar-group-content.collapsed {
    max-height: 0;
}

/* Optional: nhẹ nhàng hơn khi collapsed */
.sidebar-group-content.collapsed .sidebar-link {
    padding-top: 0;
    padding-bottom: 0;
}

.sub-item {
    padding-left: 40px;
    font-size: 13.5px;
}

#helpContent {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}
#helpContent h4 {
    font-size: 1.25rem;
    margin-top: 1.8rem;
    color: #0d6efd;
    border-bottom: 2px solid #0d6efd;
    padding-bottom: 6px;
}

/* Tab manual styling */
.tab-switch {
    cursor: pointer;
    user-select: none;
}
.tab-switch.active {
    font-weight: bold;
    border-bottom: 3px solid #0d6efd;
}

/* Search highlight */
.help-highlight {
    background-color: #ffeb3b;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Responsive */
@media (max-width: 992px) {
    #helpMain { flex-direction: column; }
    .sidebar { width: 100%; max-height: 200px; border-bottom: 1px solid #dee2e6; }
}

/* help.css – Thêm phần custom tabs để tránh conflict */
.help-custom-tabs {
    display: flex;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 20px;
}
.help-tab-link {
    padding: 10px 20px;
    cursor: pointer;
    user-select: none;
    border-bottom: 3px solid transparent;
}
.help-tab-link.active {
    font-weight: bold;
    color: #0d6efd;
    border-bottom: 3px solid #0d6efd;
}
.help-tab-link:hover {
    background: #f8f9fa;
}

.help-tab-contents .help-tab-panel {
    display: none;
}
.help-tab-contents .help-tab-panel.active {
    display: block;
}

/* help.css – Phiên bản tabs VISUALLY APPEALING hơn (pill style hiện đại, mượt mà) */
/* help.css – Phiên bản tabs VISUALLY APPEALING (underline indicator hiện đại, không "mảng xanh" lớn) */
.custom-tab-header {
    display: flex;
    background: transparent; /* Không nền toàn bộ */
    border-bottom: 2px solid #dee2e6; /* Đường kẻ dưới nhẹ */
    margin-bottom: 24px;
    overflow: hidden;
}

.custom-tab {
    flex: 1; /* Chia đều chiều rộng */
    padding: 14px 20px;
    text-align: center;
    cursor: pointer;
    user-select: none;
    color: #6c757d; /* Màu xám khi inactive */
    font-weight: 500;
    font-size: 15px;
    position: relative;
    transition: color 0.3s ease;
}

.custom-tab:hover {
    color: #0d6efd;
}

.custom-tab.active {
    color: #0d6efd !important; /* Chữ xanh đậm khi active */
    font-weight: bold;
}

/* Indicator underline mượt mà (dày, animate) */
.custom-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px; /* Đè lên đường kẻ dưới */
    left: 50%;
    width: 60%; /* Độ rộng indicator (có thể chỉnh 80% nếu muốn dài hơn) */
    height: 4px;
    background: #0d6efd;
    border-radius: 2px;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

/* Hover indicator nhẹ */
.custom-tab:hover::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 40%;
    height: 3px;
    background: rgba(13, 110, 253, 0.3);
    border-radius: 2px;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

/* Responsive mobile: xếp ngang vẫn đẹp, indicator ngắn hơn */
@media (max-width: 768px) {
    .custom-tab {
        padding: 12px 16px;
        font-size: 14px;
    }
    .custom-tab.active::after {
        width: 50%;
    }
}